What's wrong with this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's wrong with this code?

can't take the string input https://code.sololearn.com/cTGF679tpfcB/?ref=app

4th Feb 2018, 2:41 PM
Karan Singh
Karan Singh - avatar
2 Answers
+ 6
gets() is obsolete. Do not use <conio.h>, getch().
4th Feb 2018, 3:04 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
gets(), puts(), getch(), putch() don't work with C++ on CPG. If you want to use them, create the code in C.
4th Feb 2018, 3:07 PM
DAB - avatar