Hey, i just start working with string and i am totally noob =). So i would like to ask you if you can help me... I have some programs to write, but i have a little problems to get the code working...
Ok first question is, how do i make a program, that will ask a user to input 10 lines of text.
void lines(string lines)
{
for (int i=0; i<10; i++)
{
cout<<"Line "<<i+1<<": ";
getline(cin, lines);
cout<<endl;
}
}
I wrote it like this. With this code i could write 10 lines of text, but the line here ends when i press enter(running in cmd). I would like that the lines will count, not when i press enter, but when the text goes in new line(because it is at the end of the cmd window). Is this possible?
I hope you understad what i ment =)
ps
----------
sry for my bad english =)