hi all...
learning c pointers. i have this code :
PHP Code:
#include <stdio.h>
int main () {
char string3[10], string4[] = "foo moo loo";
for(; (*string3 = *string4) != '\0'; string3++,string4++)
;
return 0;
}
the compiler returns:
strings.c: In function `main':
strings.c:25: error: wrong type argument to increment
strings.c:25: error: wrong type argument to increment
strings.c:25: warning: left-hand operand of comma expression has no effect
strings.c:25: warning: statement with no effect
what i don't understand is why the "wrong type argument to increment" error?
if the array name is also a pointer to the first element in the array and i'm using pointer aritmetic to move through the array/string why 'wrong type'?! isn't the address always an int?!
thanks....