0

Question about output

Hello gang, I have a question as stated in the title: how can I get an output of multiple lines? I found an answer online but I forgot to save it and now I'm at a loss right now. The code I'm looking for is as follows (pseudocode): cout<< "Enter a text here:" cin>> a long line of text with spaces, commas and integers; cout<< a long line of text with spaces, commas and integers; It was a getline command, but it had a few steps which I didn't quite grasp. Is there an easy and sufficient way to get a string output of multiple words as stated above? Thanks in advance, Dawid

8th Dec 2018, 10:00 AM
Dawid
Dawid - avatar
1 Answer
+ 2
string str; getline(cin, str);
8th Dec 2018, 10:27 AM
Mustafa K.
Mustafa K. - avatar