Why does the following code gives an error.
char c[]="sometext";
char **cp = &c;
This gives the error "can not covert from char (*)[8] to char**;
But when i change the code to
char *c="sometext";
char **cp = &c;
or to
char *c[]={"sometext"};
char **cp = c;
The code runs smoothly.
I have been taught that arrays are conveted to pointers internally by
compiler.
So why the first code is giving the error since saying char c[] is
same as saying char *c ?
regards,
Yogesh Joshi