I've tried cout << = *mp->name;
cout writes data to the terminal window, so that has nothing to do with what you want.

A class and a struct are almost the same thing, so you can add get and set functions to your struct the same way you did in the CPayRoll class.