When learning C++, the books always create structs as follows:
struct X{
int a;
};
X y;
X *yp; // pointer to object of X class
But I've seen some C++ code online where people instead use the following syntax:
struct X y;
struct X *yp;
Why do they add the struct in front and is there any difference between the two methods of creating objects of X class.