hi i am a high school student and i am having trouble figuring out 
the current problem i am working on. here it is. for some reason i 
get problems when entering more than one value per variable and i 
already tried cin.get it just skips other fields when i use it.

#include <iostream.h>
struct address_info
{
 string name_1st[20];
 string name_mid[2];
 string name_last[20];
 string home_address[30];
 string city[20];
 string state[2];
 string zip_code[10];
 string country[20];
 string phone[20];
 string email[30];
};

void main ()
{
 address_info person1;

 cout<<"Enter First Name:"<<endl;
 cin.get.get(person1.name_1st);
 cout<<"Enter Middle Intial:"<<endl;
 cin.get(person1.name_mid);
 cout<<"Enter Last Name:"<<endl;
 cin.get(person1.name_last);
 cout<<"Enter Home Address:"<<endl;
 cin.get(person1.home_address);
 cout<<"Enter City:"<<endl;
 cin.get(person1.city);
 cout<<"Enter State:"<<endl;
 cin.get(person1.state);
 cout<<"Enter Zip Code:"<<endl;
 cin.get(person1.zip_code);
 cout<<"Enter Country:"<<endl;
 cin.get(person1.country);
 cout<<"Enter phone number:"<<endl;
 cin.get(person1.phone);
 cout<<"Enter email address:"<<endl;
 cin.get(person1.email);
cout<<endl;
cout<<person1.name_1st<<" "<<person1.name_mid<<" "<<person1.name_last
<<endl;
cout<<person1.home_address<<" "<<endl;
cout<<person1.city<<","<<person1.state<<" "<<person1.zip_code<<endl;
cout<<endl;
cout<<person1.phone<<endl;
cout<<person1.email<<endl;
 }





>-----------------------------------------~-~>
CHECK THE ARCHIVE BEFORE POSTING!!!! Archive is available at 
http://www.eScribe.com/software/C-Paradise/

>------------------------------------------_->


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/C-Paradise/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to