/****************************************************************************************** ex2.cpp simple intro to OOP ******************************************************************************************/ #include <iostream> #include <string> using namespace std; //class definition class name { public: string first; string last; }; void main() { name father; father.first = "Doug"; father.last = "Trebbin"; cout << "Father: " << father.first << ' ' << father.last << endl; name junior; junior.first = father.first; junior.last = father.last; cout << "Junior: " << junior.first << ' ' << junior.last << endl; return; }