What is the difference between “struct” and lack of “struct” word before member of a struct
问题 I have to create simple List implementation. They guy who wants that put struct before member next of class Node . Why is there a struct word, what would be the difference without it? struct Node{ int value; struct Node *next;//what is this struct for? }; struct List{ struct Node *first, *last; }; 回答1: In your example, there is no need to use the struct keyword before the next declaration. It is usually considered a throw-back from C, where it is required. In C++, this would suffice: struct