Hi all,
Can anyone tell me, what is the diff between
Code:char **maze char *buf w -> m
Hi all,
Can anyone tell me, what is the diff between
Code:char **maze char *buf w -> m
diana --> programming is tough
char **maze is a pointer to a pointer to a char
char *buf is a pointer to a char
The w -> m I have no idea what you're referencing. It could be that w is a pointer to an instance of a struct and m is a member of that struct.
If you understand what you're doing, you're not learning anything.
ah i see, ya you are right, w is a reference to N which is a int in a struct
what you mean by char **maze is a pointer to a pointer to a char.
Can i say, maze ia a pointer that points to a char character.
Same goes for the char *buf.
buf is a pointer that points to a char character
Last edited by dianazheng; 10-22-2004 at 07:34 PM.
diana --> programming is tough
No. You can say: maze is a pointer to a pointer to a character. For every *, you have the words "pointer to a[n]". Thus:Originally Posted by dianazheng
This is worded as: "foo is a (*) pointer to a (*) pointer to a (*) pointer to a (*) pointer to an int.Code:int ****foo;
Quzah.
Hope is the first step on the road to disappointment.
a pointer to a pointer takes things one step further. By adding a pointer that points to a pointer(that points to a char) you can change what the first pointer is pointing to.