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

+1

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

coding-space.ru

2 Answers

New Answer

+5

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

+2

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.