+ 4
Gets not working
Why does gets in stdio.h in C++ not work in the code playground? It doesn't ask for any input from the user when in fact it should.
5 Answers
+ 12
AFAIK, gets is obsolete and no longer supported by most modern compilers.
https://stackoverflow.com/questions/7423691/is-gets-officially-deprecated
+ 14
@jacob probably!
+ 11
@Jacob Last time I checked, getline() works without being in need of the little trick. Nonetheless, what you said is legit for std::cin.get() on Code Playground.
+ 7
Same reason why getline wonât work. Input text box is only opened if you have a certain keyword in your program that SoloLearn recognizes as input. In C++, that is âcin >>â.
Add this line and it should work:
#define INPUT cin >>
I know that makes getline work anyway.
+ 3
@Hatsy Rei
Probably just another problem with the iOS app, I still have to put it there.