I know I could get this to work by doing a different way but that is not what I want. I want the user to input something wether it be, mad, sad, happy and then depending on which they TYPE display a different text. I don't want an options menu! Not looking for something like this: press M for mad or S for sad. I want to be able to feed off of the whole word.(If its possible)Code:#include <iostream> using namespace std; int main() { char personality[20]; cout <<"Enter personality: " <<endl; cin.getline(personality,20); if (personality[20] == 'mad') { cout <<"$$$$ the world!" <<endl; } else { cout <<"Lovely" <<endl; } system("pause"); }



LinkBack URL
About LinkBacks



