October 8th, 2013, 04:12 AM
What does this code mean?
typedef struct myStruct *newStruct;
I know that struct myStruct is also known as *newStruct, but could you please explain the *newStruct? What is it...Is it a pointer?
October 8th, 2013, 10:23 AM
You are bit wrong. You should say:
is known as
i.e. newStruct is a type "pointer to struct myStruct"
October 8th, 2013, 03:39 PM
Although the language syntax does not require it, it is clearer to place the * qualifier with the with the base type that it qualifies rather than the type name that is being defined.
typedef struct myStruct* newStruct ;
Last edited by clifford; October 9th, 2013 at 04:58 AM.
October 9th, 2013, 12:14 AM
Thanks to the both of you man, now that I know it... :)