when i enter '1' .. the cout is connected,i cant even input the 1st line,which is the 'name = '.. help me pls.
#include<iostream>
#include<string>
using namespace std;
void main()
{
int input;
int choose;
string name;
string icNum;
string parentName;
string address;
string TelNum, parentTelNum;
cout << "\n\t\t\t STUDENT REGISTRATION SYSTEM" <<endl <<endl;
cout << "1. ADD" <<endl;
cout << "2. EXIT" <<endl <<endl;
cout << "ENTER OPTION : ";
cin >> input;
switch (input){
case 1:
cout << "Please Enter Student Name : ";
getline(cin, name);
cout << "Student's IC number/passport number: " ;
getline(cin,icNum);
cout << "Student's address: " ;
getline(cin, address);
cout << "Parent's name: " ;
getline(cin,parentName);
cout << "Enter parent's telephone number: " ;
getline(cin,parentTelNum);
cout << "\nYour input was : " <<endl <<endl;
cout << "Student's name: " << name <<endl;
cout << "Student's IC number or passport number : " << icNum << endl;
cout << "Student's address : " << address <<endl;
cout << "Parent's name : " << parentName <<endl;
cout << "Parent's telephone number : " << parentTelNum << endl <<endl;
cout << "Press 1 - Re-enter particular" <<endl;
cout << "Press 2 - Confirm that the student's particular is correct" << endl;
cout << "Options : ";
cin >> choose;
break;
default:
cout << "Thank you " <<endl;
}
}