Doesn't output a thing (C++) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Doesn't output a thing (C++)

In the following code, I tried to make an input (a sentence) and it said, "No output." How on earth is that possible? Which input method should I use? I tried cin, but only gave out only the first word. Tried getline, no output. Can anyone help? Here's the code:

9th Apr 2017, 11:19 AM
Muhammad Hidayat
Muhammad Hidayat - avatar
2 Answers
+ 1
Because your program crashes at line 36. Use temp += c; to add a character instead.
9th Apr 2017, 4:59 PM
Dennis - avatar
+ 1
use cin>>text
9th Apr 2017, 12:11 PM
Calviղ - avatar