0
Why does it keep asking me to add new lines to separate multiple inputs? What does it mean?
#include <iostream> using namespace std; int main () { int a; //How old are you? cin>> a; return 0; }
17 Respuestas
+ 7
yeah you can only run inputs at the start with Sololearn
+ 5
you literally just
hit enter button for the next line of input
+ 3
You should really use a PC for code and copy to your mobile or email it to yourself once you're done. Mobile IDEs provide terrible debug messages. What's the error or error message?
* They tend to "hide" compiler messages as far as I understand (not a mobile enthusiast, never will be)
+ 2
It works like this.
Line 1: input1 - first value to cin(line 1)
Line 2: input2 - second value to cin(line 2)
+ 2
I had some issues in the code that caused a runtime error.
I debugged it.
Thank you for pointing it out!
My code just got that much better.
+ 1
@Jamie is right,
edit
The only one that works well on Sololearn (SL) is the javascript interpreter.
+ 1
Try using this code,
it may make more sense
https://code.sololearn.com/c9LIOvuauqq7/?ref=app
+ 1
Thanks
+ 1
Also why does it say time limit exceeded sometimes when you click output?
+ 1
@Harley
The runtime error and missing values.
I took care of it.
+ 1
@Jamie
Thats right I used to code on mobile.
Now I use my PC to write code.
Only some of the code I write works on SL.
+ 1
@Ahri Fox: You double posted... No, problem was interactive prompts. Pseudo code:
a = new Person;
do {
a.getName();
a.chkDup();
} while (a.has("quit") == false);
That example won't work because it's interactive. A text adventure is another example. Anything needing an input followed by another input later will fail unless it's finite (ex: Name, Number, Gender). That and the console rendering (should be 80x24) are the problems.
0
The Solo Learn console is FAIL. I have the same issues with a Python game I made. Find another emulator and recommend people use that for your code or post non-interactive code. Nothing we can do until SL fix it.
0
Pointing what out?
0
How did you debug it?
0
Debug messages?
0
@Manual: Yeah, for C/C++ it's worse. At least with Python QPython runs most code. But I think it's okay to post code for PC on SL because many are complaining they want full PC access next update and/or better emulator. Fingers crossed :)