T
trey
Hello brilliant people of c.l.c. -
I have a question about pointer declarations. Is there a difference between
the following declarations, and if so - what is it ?
char* int;
char * int;
char *int;
The type doesn't have to be char particularly. I'm just wondering if the
placement of the asterick is seriously important. Seems like it probably
is, but in this little experimental program I just wrote involving
pointers, I tried the first and last declarations and there was no
difference. Of course, this could have been luck and there is something
undefined going on in the background, which is why I'm posting this .
And since I've seen them used in all three ways, I was curious.
Thanks for any info...
-trey
I have a question about pointer declarations. Is there a difference between
the following declarations, and if so - what is it ?
char* int;
char * int;
char *int;
The type doesn't have to be char particularly. I'm just wondering if the
placement of the asterick is seriously important. Seems like it probably
is, but in this little experimental program I just wrote involving
pointers, I tried the first and last declarations and there was no
difference. Of course, this could have been luck and there is something
undefined going on in the background, which is why I'm posting this .
And since I've seen them used in all three ways, I was curious.
Thanks for any info...
-trey