andreyvul <> writes:
> gcc 3.4 (mingw) says error: invalid operands to binary + when I try to
> to pointer arithmetic to calculate offset of a certain element.
[...]
> cheat_t *cheat;
[...]
> printf("debug: cheat[n_cheats - 1] @ %p\n", cheat + (cheat_t *)
> (n_cheats - 1));
You can subtract two pointers, or add an integer to a pointer,
but adding two pointers makes no sense. What are you really
trying to do?
--
char a[]="\n .CJacehknorstu";int putchar(int);int main(void){unsigned long b[]
={0x67dffdff,0x9aa9aa6a,0xa77ffda9,0x7da6aa6a,0xa6 7f6aaa,0xaa9aa9f6,0x11f6},*p
=b,i=24;for(;p+=!*p;*p/=4)switch(0[p]&3)case 0:{return 0;for(p--;i--;i--)case+
2:{i++;if(i)break;else default:continue;if(0)case 1

utchar(a[i&15]);break;}}}