+ 1
cin always executing without being called
please help, for some reason, even without running the function containing cin, it always runs and asks for input I've tried the exact same code on other compilers and it doesn't happen, is this a bug in sololearn? or am I doing something wrong?
4 Réponses
+ 5
You have to provide sololearn the input beforehand means at the compile time, during when sololearn does not know wether that "cin" would be executed at runtime or not, so just to be prepared it asks you for input.
+ 2
You can enter the value before and if the function is not called it will not be used so it is okey
+ 1
Arsenic how do I tell sololearn I want the cin to be requested after the cout (during runtime)
0
coffeeunderrun okay then, is there another way to take inputs from the user? in my game there will be constant inputs required from the user, is it not possible at all in sololearn?