When accessing a member of some class, I can use e.g.:
this->myVar = 10
or I can just write:
myVar = 10
I sometimes uses explicit this-> in setters, since they allow me to use the same name for the parameter names as the instance fields:
class MyClass
{
int foo;
void setFoo(int foo)
{
this->foo = foo;
}
}
however, in constructors, I usually use initialization list, which does not require an explicit this->
class MyClass
{
int foo;
MyClass(int foo) :
foo(foo)
{
}
}