I am new to C++. I wrote a code. The problem is that I am not able to give a string as input. Whenever i press ENTER after giving my admission number then the program jumps straight to "Do you want to add another (Y/N) ?". The program simply displays "Enter the name of the student :", but does not take in any input. Please help me solve my problem.
You haven't specified the return type of the function student(). You haven't written anything in your main() function. Nothing should happen when you compile this program. There are too many errors in your code. You didn't even close the function braces properly. Why is there second semicolon at the point where the function ends? Did this code even compile? Which compiler are you using?