I have a program like this,
char name[100]; char age[12]; cout << \"Enter Name: \"; cin >> name; cout << \"Enter Age: \"; cin >> age
When you use cin.get() compiler will take the lastly used Enter(i.e Enter key pressed while entering name). so you need to make the compiler to avoid the lastly entered Enter key to do so you need to include cin.ignore() before using cin.get().
cin.get()
cin.ignore()