Using "this" directly is not a frequent occurence in C++. As long as you don't, the above think will work. And if you do, you can always say
#undef this
before and
#define this THIS
after.
Can you say code obfuscation? I knew you could.
Edit: btw, in a cource on OO in C++, this deserves an F, not an A.
8<-------------------------------------------
#include <stdio.h>
#define this THIS
class A {
public:
A() : this(10){}
void printThis() {
printf("%d\\n", this);
}
private:
int this;
};
int main(int argc, char *argv[]) {
A a;
a.printThis();
}