Pointer declaration with and without struct?

What’s the difference between:

  struct name{
    int example;
    name *next;
    };

struct name *next= NULL;

…and

name *next=NULL;`

(defined after the data structure, when the linked list is still empty)
?


Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.