Reading words and lines
Read · 1 of 4
cin stops at spaces
cin >> name reads one word: it stops at a space or a new line.
To read a whole line, spaces included, use getline(cin, line).
Read · 1 of 4
cin >> name reads one word: it stops at a space or a new line.
To read a whole line, spaces included, use getline(cin, line).