vendredi 22 mars 2019

Function allows word but not Phrase c++

I have a function that allows a user to input a word or phrase then display it on a menu but for some reason it will display a word but not a phrase, system crashes when I use more than one word

snippet of my function code:

string GetWord(void){
  string localString = "";
 cout<< "please enter a new word or phrase: ";
  cin >> localString;
  return localString;
  }

  

does anyone know what I have done wrong ? the menu will display a single word but not double.

Aucun commentaire:

Enregistrer un commentaire