C++ preprocessor and user input on SoloLearn | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

C++ preprocessor and user input on SoloLearn

Hi, I think the user input does not work as it should. Apart from the fact that he is uncomfortable, he should ask for data EXACTLY when we want to take it. What I see, currently the code is simply checked if there are any (non-commented) instructions for the standard input (in C ++ "cin >>") anywhere in the code. That is why we are asked for it even when the program actually does not load anything (I'm talking mainly about the preprocessor). I know you can leave dialog box blank, but it should not be displayed. I think it would be better if the dialog box asking for input appeared based on the generated final source code, after the linker, etc. Now I see at least two errors: -This generates a window with input (and should not): https://code.sololearn.com/cBaLbupuRlga/#cpp -This does not generate (and should): https://code.sololearn.com/cxYKKZly8N4I/#cpp What do you think about it?

13th Feb 2019, 7:50 PM
DLZaan
2 Answers
+ 5
You should pass all data at the beginning separated by newlines, i agree that this should/could be changed /:
13th Feb 2019, 8:01 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
Hi, thanks for reply. I know how to pass data, and that we don't have compiler on our machines, but it's all made by sending our code to cloud, and that's why we have to give it before running a program (ideone.com works quite similar). But it looks like code is interpreted badly, so system does not really know when to even ask for it (again, ideone.com can do it better, copy my code, give it some input and you will see).
13th Feb 2019, 8:06 PM
DLZaan