Originally Posted by
roaan
Okay so that implies i can make declarations like
element S1, S2 ;
S1 -> data = some value
S1 -> next = some address // all this is ok
but this is
elementT S1, S2;
S1 ->data = some value
S1 -> next = some address // this is wrong
Correct. But you COULD do:
Code:
struct elementT S1, S2;
S1 ->data = some value
S1 -> next = some address // this is wrong
The purpose of the typedef is to create a more convenient alias for "struct elementT" instead of saying "struct" everywhere.