If you have a private class variable, say private int a; and a local function variable int b; then a and b can be used in that function in the same way, you can't spot the difference. A couple of conventions exist to make this more visible in your program:
- prefix the class member variables with something like m or m_ (just an underscore is done in c# but you can run into clashes with reserved names in c++)
- always dereference them with this->a