If cin breaks on space meaning that it will return the first word. What should i use to enter whole string with many spaces? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

If cin breaks on space meaning that it will return the first word. What should i use to enter whole string with many spaces?

13th Nov 2017, 2:39 PM
Frankestine Stine
Frankestine Stine - avatar
2 ответов
+ 7
try getline(cin,variable);
13th Nov 2017, 2:40 PM
Manual
Manual - avatar
13th Nov 2017, 2:41 PM
Manual
Manual - avatar