Possible Duplicate:
Extract multiple words to one string variable
changing the delimiter for cin (c++)
I'm having trouble using the cin. My code:
cout << "Enter Main Keyword: ";
cin >> mainKeyword;
cout << "==========" << endl;
cout << "Enter Secondary Keyword: ";
cin >> secondaryKeyword;
When I enter "key word" (without the quotes) for the mainKeyword variable, the program automatically assigns "key" to mainKeyword and "word" to secondaryKeyword, what is the code to get the program to consider two or more strings as one input?
Thanks.