October 8th, 2013, 03: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, 09: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, 02: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 03:58 AM.
October 8th, 2013, 11:14 PM
Thanks to the both of you man, now that I know it... :)