So, I made a structure and then tried to declare global pointers of that struct class. However, my compiler gave error (VS 2019) and didn't let me create them.
Can anyone explain the reasoning behind it?
Here's the structure (it's basically the node of Linked List)
I am getting error on declaration of head and tail there...
Moreover, can anyone tell me the difference between the above declaration and the following declaration?
The compiler allows this declaration which is done immediately after struct definition. But I presume that both of these declarations create Global Pointers so the former way shouldn't cause any issue? Or should it?
I tried it again to get the error and apparently, no error is given now. No idea what went wrong the last time.
Sorry for this. and thank you for the reply. This question is solved