c++ define a class inside a class code example Example: create class instance c++ MyClass* MyObject = new MyClass();