return "this" in C++?

Viewed 55093

In Java you can simply return this to get the current object. How do you do this in C++?

Java:

class MyClass {

    MyClass example() {
        return this;
    }
}
3 Answers
Related