Cclass Foo{public: Foo() { qDebug() << "Foo()"; } void test() { qDebug() << "AHAHAHA";} ~Foo() { qDebug() << "~Foo";}}; int main(int argc, char *argv[]){ Foo *foo = (Foo*)28; foo->test(); return 0;}
C++ (Qt)Foo *foo; foo->test();
C++ (Qt)class MyClass{public: QString toString() const { if (this) return field_; else return QString(); }private: QString field_;};