C++ structures | SoloLearn: Learn to code for FREE!


C++ structures

What is the difference between: struct Node { int data; struct Node* next; }; struct Node* head; and: struct Node { int data; Node* next; }; Node* head;

3/23/2019 10:11:56 AM


2 Answers

New Answer


Examples are the best: https://code.sololearn.com/cmMoHgMVK40B/?ref=app


coding-space.ru In C++ there is no difference , most of the time it is unnecessary qualification, nevertheless it is useful for declaring forward references. In C you need to use typedef for c++ style declaration, else use fully qualified names.