what is wrong with this program?
#include<iostream>
class student
{
private:
char name[100];
char address[100];
char city[100];
char state[2];
char zip[5];
public:
student(){};
student( char name,char address,char city,char state,char zip);
void getdata()
{
cout<<"Enter name:"; cin>>name;
cout<<"Enter address:"; cin>>address;
cout<<"Enter city:"; cin>>city;
cout<<"Enter state:"; cin>>state;
cout<<:Enter zip:"; cin>>zip;
}
void showdata()
{
cout<<"NAME IS:"<<name<<endl;
cout<<"ADDRESS IS:"<<address<<endl;
cout<<"CITY IS:" <<city<<endl;
cout<<"STATE IS :"<<state<<endl;
cout<<"ZIP IS :"<<zip<<endl;
}
};
int main()
{
{
student();
student .getdata();
student .showdata();
}
return 0;
};
thnks everyone but it still not working
Thank you evryone !
I still get the same 2 error messages! greencherry can you please post the program the way you coded?