autoreferencing this class to use in another for c++
- by atomsfat
in java we can do this:
public class A{
public static void main(String...str){
B b = new B();
b.doSomething(this); //How I do this in c++ ? the this self reference
}
}
public class B{
public void doSomething(A a){
//Importat stuff happen here
}
}
How can I do the same but in c++, I mean the self reference of A to use the method in B ?