#include #include using namespace std ; class Person { private: int age ; string firstName ; string lastName ; public: void setAge( int ageP ) { age = ageP ; } int getAge() { return ( age ) ; } void setFirstName( string firstNameP ) { firstName = firstNameP ; } string getFirstName() { return ( firstName ) ; } void setLastName( string lastNameP ) { lastName = lastNameP ; } string getLastName() { return ( lastName ) ; } void print() { cout << "Name:" << firstName << " " << lastName << " Age: " << age << endl ; } }; int main() { Person personObj ; personObj.setFirstName( "Robert" ) ; personObj.setLastName( "Newman" ) ; personObj.setAge( 82) ; personObj.print() ; //Get age directly by addresses Person* ptr = &personObj ; int ageHack = *( (int*)ptr ) ; cout << "ageHack =" << ageHack << endl ; //cout << personObj.age << endl ; //double total = 13.55 ; //total = total - .25 ; //printf( "%5.20f" , total ) ; return 0 ; }