Originally Posted by
Elysia
Yes, you can do that. So long as you do not create a new variable with an identical name to one stored as a class member, you do not need "this->". It is implicitly deduced by the compiler.
If you do shadow a member variable, then you do need "this->" to distinguish between the two variables. If you omit it, the local variable will be used instead.
Many programmers actually tend to prefer prefixing or subfixing (is that a word?) member variables to distinguish them from local ones. I always tend to add "m_" to all member variables.