0

Output before Input in C++

Is there a way to get output to show before input is asked for in C++? For example, could I get instructions such as “To add type 1” to appear before any user input is asked for? This would be helpful so that program users could get instructions on what the program is asking for while it is running rather than having to cancel their previous inputs and read the defaulted directions. Any help is appreciated, thanks!

31st Jul 2018, 9:19 PM
Bailey
Bailey  - avatar
2 ответов
0
Unfortunately in Sololearn it does not work. There you have to provide any input in advance. But in general just use cout first, and then read the input with cin.
31st Jul 2018, 9:22 PM
Matthias
Matthias - avatar
0
Matthias , thanks for the answer, I figured this might be the case.
31st Jul 2018, 11:11 PM
Bailey
Bailey  - avatar