When accessing a member of some class, I can use e.g.:
this->myVar = 10
or I can just write:
myVar = 10
I like to use this-> because it explicitly declares that the variable is a member of this class, but does it cause any overhead in comparison to just using the variable name by itself?
As an alternative I could maybe add a unique prefix to the vars, such as _TmyVar, but I’ve been using this-> for a long time so I just wondered.
There is no overhead. The compiler will generate the exact same code for both versions.