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