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