What does an asterisk (*) after a variable name mean in opengl?

Viewed 27974

I'm seeing this line in a source that I'm studying but can't seem to find anything related to "asterisk after variable" or "variable before asterisk". What does it mean?

GameDrawer* gameDrawer;

GameDrawer is also used as a name for a function and class.

5 Answers
Correct me if I’m wrong, but I think all of these are the same thing:
• GameDrawer * gameDrawer;
• GameDrawer* gameDrawer;
• GameDrawer *gameDrawer;

The syntax doesn’t care where the spaces are, as long as there is one. These statements are declaring a pointer by the name of gameDrawer which is of type GameDrawer. Assuming GameDrawer is a class.

Related