1 | initial version |
It is basic C++: When you are using a pointer to a class, the class members are accessed by ->
and not by .
.
For better understanding, please read this and everything linked to that that you can find on Google
But in your case there is something wrong; it should be .
instead of ->
. Probably, as you mentioned, you have copied the code from more sources and in one place there was something like a pointer to the gray
, but I do not understand why.