I am making a text adventure game in C++. Right now I am getting the input like this:
string word1, word2;
cin >> word1 >> word2;
parse(word1, word2);
An example input could be
goto store
Right now, to quit you would have to type quit and any other text to quit.
How can I make it so the input is separated by a space and I can tell if the second string is empty.
UPDATE
I tried the first answer, and i get this error on windows:
The instruction at 0x00426968 referenced memory at 0x00000000. 
The memory could not be read.
Click OK to terminate the program.
 
     
     
    