I'm in a function in java and I create a new Object passing "this" as parameter:
class AClass { 
    AClass(TestClass testClass) { }
}
class TestClass {
    AClass doSomething()
    {
        return new AClass(this);
    }
}
How to do That in C++?
Should be:
class AClass {
    AClass(TestClass* testClass) { }
};
class TestClass {
    AClass* doSomething()
    {
        return new AClass(*this);
    }
};
Should I pass *this, or &this?
 
     
     
     
    