Compile ignore input from user when add new data ...How it solve
#include<iostream> #include<fstream> using namespace std; struct variable { char name,sex[5], blood_grp, address, choice; int donor_no, age; }; void add_new_data() { variable v; char a; re_data_enter: cout << " ===========================================" << endl; cout << " | BLOOD BANK SYSTEM |" << endl; cout << " ===========================================" << endl; cout << endl; cout << "Enter the Donor no. : "; cin >> v.donor_no; cin.ignore(); cout << "Enter the Donor name : " << endl; cin.get(v.name); cin.ignore(); cout << "Enter the Donor age : " << endl; cin>>v.age; cin.ignore(); cout << "Enter the Donor Sex : " << endl; cin.get(v.sex,5); cin.ignore(); cout << "Enter the Donor Blood Group : " << endl; cin.get(v.blood_grp); cin.ignore(); cout << "Enter the Donor Adress : " << endl; cin.get(v.address); cout << endl; cout << endl; cin.ignore(); cout << "Should You Add New Donor Data....(Y/N)" << endl; cin.get(v.choice);