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.
GameDrawer
bygameDrawer
. I have to imagine instead, that this is some form of C code and has nothing to do with OpenGL or its C-like language (GLSL).GameDrawer
is nearly equivalent toint
; you can have variables of that type, have pointers and references to instances of it, use it as a type parameter in templates, etc etc etc. About all you can't do is (1) use it as the underlying type of an enum, and (2)memcpy
its instances around willy-nilly. (You can actually even do (2) in some cases, with so-called "trivially copyable" types. But til you understand what "trivially copyable" means, it's safer to assume you can't.)