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!
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.
0
Matthias , thanks for the answer, I figured this might be the case.