Re: This is really lame...
Your program just won't compile due to its lack of string header file. I don't understand why it is eliminated for a problem's proposal.
My mom told me that private keyword should be used for local class variables.
Re: This is really lame...
use this code
Code:
#include <iostream>
#include <cstdlib>
#include <cstring>
using namespace std;
enum moods {md_normal, md_happy, md_ecstatic, md_sad, md_mad, md_angry};
enum gender {gn_male, gn_female};
class Person
{
public:
char *myFullName;
string myTitle;
int myAge;
moods myCurrentMood;
gender myGender;
int askAge() {return myAge;};
int askMood() {return myCurrentMood;};
int askGender() {return myGender;};
string askTitle() {return myTitle;};
string askName() {return myFullName;};
string speakToPerson(string targetPerson, string speechString);
void speakToSelf(string speechString);
};
int main()
{
Person mom;
mom.myFullName ="Kellie Johnson";
mom.myGender = gn_female;
mom.myTitle = "Mother";
mom.myAge = 38;
cout << "We created a person." ;
cout << endl;
cout << "This person's name is ";
cout << mom.myFullName;
cout << endl;
return 0;
}