View Single Post
  #3 (permalink)  
Old February 23rd, 2008, 04:57 PM
unpopular unpopular is offline
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

//Sometimes the getLine works and at other times it does not work.
void directory::enterTheDetails()
{
  clrscr();
  newDataLogo();
  gotoxy(30,10);
  char ch;
  cout<<" \n Please enter the first name of the new contact : ";
  cin>>contactFirstName;
  ch = cin.get();
  cout<<" \n Please enter the last name of the new contact : ";
  cin>>contactLastName;
  ch = cin.get();
  cout<<" \n Please enter the Home Address of the new contact : ";
  cin.getline(homeAddress,50,'\n');
  cout<<" \n Please enter the email address of the new contact. : ";
  cin.getline(email,25,'\n');
  cout<<" \n Please enter Land line Phone Number of the new contact: ";
  cin>>landLinePhone;
  ch = cin.get();
  cout<<" \n Please enter Cellular Phone Number of the new contact: ";
  cin>>cellularPhone;
  ch=cin.get();
}

Reply With Quote