+ 1

C++ code works on one compiler but not on code playground

I am currently learning C++ and I created this code, it is a work in progress role play game(RPG). It works on this other C++ online compiler, but when I paste the code into the code playground editor, It gives the text but you can't type in the RPG. Here is the link to the RPG I made on the compiler I use: https://onlinegdb.com/ByFQopjBM

28th Jan 2018, 10:16 PM
Alex
Alex - avatar
6 Answers
+ 7
It works on the playground, but it doesn't run like you'd want. All input to the program needs to be specified before the program starts running. Then input and the program is put on a server and run. Finally, your output is brought back to display on your device.
28th Jan 2018, 10:31 PM
John Wells
John Wells - avatar
+ 5
lol Just tried. Got close but it failed. https://code.sololearn.com/WsicFU1m076g/?ref=app
29th Jan 2018, 12:29 AM
Manual
Manual - avatar
+ 4
The playground is limited. if you want to use it on sl... The best I can think of, is iframe the link to your save code through web codes and use the online compiler.
29th Jan 2018, 12:22 AM
Manual
Manual - avatar
+ 1
Basically what John said. Anything run interactively won't work in C/C++/Py/Likely Java. SL _still_ haven't fixed this and my old account practically spammed them to do something about it. If you wanna show off code, put the source on SL with a link to a site/app that'll run it. That's what I did in another life.
28th Jan 2018, 11:31 PM
non
0
+1 for creative thinking.
29th Jan 2018, 10:20 PM
non
0
So I was thinking to use key detection in the code playground, but when I tried it it said to long of a wait, so I think I might go with using iframe.
31st Jan 2018, 2:29 PM
Alex
Alex - avatar