I was wondering is there was an advantage of any kind by using 'this' to reference class members, rather than not using it, in c++?
for example...
class Test
{
public:
Test();
void print_test()
{
std::cout << this -> m_x // Using 'this'
<< endl;
std::cout << m_x // Rather than referencing 'm_x' this way
<< endl;
}
private:
int m_x;
int m_y;
};