[Solved] How do I use get and set methods in c++ with an object that is initialised with new [closed]
Assuming that your Person has member functions like getFirst() you would use the dereference operator (-> or *) like this: Person1->getFirst(); // equivalent to (*Person1).getFirst() solved How do I use get and set methods in c++ with an object that is initialised with new [closed]