C++ gets not working

Posted on 14.06.2018 by Douglass
Can somebody please help me to run the first program properly using gets. If I replace the gets and use the cin the program runs correctly but I cannot input a string with a space bar. Include include include using namespace std. I wrote this simple program today, but I found that cin.
Getting started with C or C C Tutorial C Tutorial C and C FAQ Get a compiler Fixes for common problems. I have some college work and as i noticed that the gets is not working but i can't figure out why. Get out, the program just ends. I'm sorry guys because it is my first time to use the gets. Can you guys help me with this. I would be very happy if you can help me.
In the program with the first main function, he gets function in the constructor of the class student is not working at all but with the second main function it is working fine. Only gets the the Category's, and it does not allow the user to input the Term's. I was playing around with some code. I tried putting getch and getchar before gets but there is something else wrong. Because my teacher required me to.