Why do I have an error in the pointer in C? -
i starting learn pointers in c.
why have error in line 8 @ &i
?
this source:
char * func(char *d, char *str) { return d; } int main(int argc, char *argv[]) { char *i = null; func(&i, "aaa"); // line 8. here have error (in "&i") }
the type of &i
not char *
char * *
.
you should go through how pointer pointers work in c?
Comments
Post a Comment