I have a problem involving strings and basic c++ functions. In one point of my program user is asked to input one or more sentences. And program's function is to put it in one string for further analysis.
The problem lies here: when multiple words are put in by user, every space ends the string and saves the following data for next inputs - useful way of dividing data for some programs, but not for this one.
And here's the question: is there any simple way of solving this problem?
Thanks in advance for anyone who solves it.
Ok, I'll try this. Thanks :)
-------------------------------------------------------------------------------------------------
There seems to be a problem with it. Here's the part of the code:
int it=0; string choice[10];
-------------------------------------
do{
cout<<"Insert choice number"<<it+1<<".\n";
getline(cin,choice[it]);
it++;}while(it<10).
It skips choice no. 1 and starts from the second one. Do you have any idea why is it like this?