Quote Originally Posted by camycent.solutions View Post
I think it is a compiler problem.If your compiler is ok then you can try this code

// cin with strings
#include <iostream>
#include <string>
using namespace std;

int main ()
{
string mystr;
cout << "What's your name? ";
getline (cin, mystr);
cout << "Hello " << mystr << ".\n";
cout << "What is your favorite team? ";
getline (cin, mystr);
cout << "I like " << mystr << " too!\n";
return 0;
}
and the relevancy of this post to the thread is.......