When making a struct, why do some structs have struct* ? Does that mean there is a pointer to the struct? If so, then why would it be struct* block, instead of struct *block? Thanks in advance.
When making a struct, why do some structs have struct* ? Does that mean there is a pointer to the struct? If so, then why would it be struct* block, instead of struct *block? Thanks in advance.
Last edited by Hikaru90; 02-25-2010 at 02:13 PM.
Perhaps you should provide some code that demonstrates what you are talking about.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
struct* block and struct *block are same ,
they are the pointer to the struct.
Let me say some simple example ( probably u may aware of this )
for ex :
Code:int* a ; // pointer to an int int *b ; // pointer to an int int*c , d ; // c is a pointer to an int , but d is a normal int , int *e, *f ; // e and f is a pointer to an int int* e , *f ; // are same as above