+ 3
What data type should I use to save a user's sentence in C++?
4 ответов
+ 11
Sentence here means words separated by space? if that's the case, then you go for string, and use getline to get a sentence. Otherwise more information about this "sentence" would be needed before anyone can answer your question.
Example:
string sentence;
getline(cin, sentence);
cout << sentence;
Hth, cmiiw
+ 11
This data type is covered here:
https://www.sololearn.com/learn/CPlusPlus/1623/
+ 4
@Elena, you're welcome, glad to help, oh and do follow @Jay's link to the lesson, it's great : )
+ 3
#Ipang ,thanks,all is going right.