try this instead:
Code:
#include <iostream> //more standards-compliant
#include<cstring> //for strcmpi()
using namespace std; //more standards-compliant
int main()
{
char string[100];
do{
cout << "What is your name?";
cin.getline (string, '\n', 100); //stops when the user presses enter or when it reaches 100 chars, whichver comes first
cout << "\nHello" << string <<".\n";
cout << "Where are you from?";
cin.getline (string, '\n', 100); //stops when the user presses enter or when it reaches 100 chars, whichver comes first
cout << "\nYour from" << string <<"! Cool me too\n";
cout << "What is your favorite sports team";
cin.getline (string, '\n', 100); //stops when the user presses enter or when it reaches 100 chars, whichver comes first
cout << "\nThe" << string <<"! Nah they suck";
}while ( strcmpi(string,"BYE")!=0); //compares what's in string to "BYE" in all cases (BYE,BYe,ByE,Bye,bYE,bYe,byE,bye)
return 0;
}