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.
That would be the c++ notation for a pointer.
Source: http://www.cplusplus.com/doc/tutorial/classes/#pointers_to_classes
Here, *
is called dereference operator. This defines a pointer; a variable which stores the address of another variable is called a pointer. Pointers are said to point to the variable whose address they store.
Check here for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With