+ 3

why is my code not work in solo learn IDE?

I wrote ceasar cipher in c++, in my IDE work fine but in solo learn IDE not work! The issue is in "cin.ignore" that not work! cin.ignor work fine in main function, but in other function not work! void ClearToCipher() { string ClearText; int key,i; cout <<"\nPlease Enter Clear Text:"; cin.ignore(256,'\n'); getline(cin,ClearText); } why? and why works in my ide?!

30th May 2018, 5:58 PM
Navid Mir
Navid Mir - avatar
2 Answers
+ 1
the sololearn playground is limited in what you can do in c++, so not everything you do will work on there. especially input is tricky since they compile the c++ on the server and you need to pass you inputs to the server in different lines
30th May 2018, 9:01 PM
Max
Max - avatar
+ 3
Thanks dude 👌👌👌
30th May 2018, 10:07 PM
Navid Mir
Navid Mir - avatar