Need help. Writing a wizard story program. not working.

I dont know how to stop my program from turning my words into numbers here is the code (i a noob at these forums so i dont know how you get it into those neat boxes)

#include <iostream>;
#include <string>;
using namespace std;

int main ()
{
char word, name;
int age, favnum;

//getting user input
cout << "welcome to wizard world of wizards!!!!" << endl;
cout << "to contiune follow the instructions" << endl;
cout << "what is your name?\n";
cin >> name;
cout << "hello " << name << "what is your age?\n";
cin >> age;
cout << "what is your favorite number?\n";
cin >> favnum;
cout << "what is your favorite noun\n? ";
cin >> word;

//story time
cout << " After a long day of doing nothing the wizard wizard " << name << "had to go to classes to learn how old the wizard's wizard tricks were." << endl;
cout << " he thought the number was " << age << "but " << name << " soon learned that number was incorrect and it was actually " << favnum << endl;
cout << word << " it cant be!!!! I was sure I was right!!! " << endl;
cout << "yet another story of wizardly tales of " << name << " the great wizard of wizardom." << endl;

system ("pause");


}
word and name should be declared as string word, name;
thank you!!!
quick question why does the word become a number?
Topic archived. No new replies allowed.