HI All... well am new in programming, so I need help to learn programming. and I hope I will get my ans here...
well I wanna to get user name, hid first and last name, so for this purpose am using getline function, also ignore function for ignoring new line character,
so after getting user name when it show out put, it ignore the first character,
I mean if user enter "Omii" , then it will output "mii" , it will ignore "O" its self . so how to solve this, ...
here is my code,
cout<<"\n\n\n Enter The Name Of Employee: ";
cin.ignore();
cin.getline(name,30);
cout<<" Enter The Employee ID: ";
cin.ignore();
cin.getline(employe_ID,20);
cout<<" Joining Date Of Employee: (DD/MM/YYYY) ";
cin.ignore();
cin.getline(joining_DATE,20);
cout<<" Enter The Position Of Employee: ";
cin.ignore();
cin.getline(position,20);
cout<<" Enter Maritial Status Of Employee: ";
cin.ignore();
cin.getline(marital_status,10);
cout<<" Enter The Age Of Employee: ";
cin.ignore();
cin.getline(age,10);
cout<<" Enter The Salary Of Employee: AED ";
cin.ignore();
cin.getline(salary,20);
cout<<" Any Comment About Employee: ";
cin.ignore();
cin.getline(comment,80);