class profile{
public:
int age,name,gender;
char ocuupation[30];
};
int main(){
profile pro1;
cout<<"Lets create a profile."<<endl;
cout<<"Enter your name\t :"<<flush;
cin>>pro1.name;
cout<<"Enter your age\t :"<<flush;
cin>>pro1.age;
return(0);
}
Here, the cin(user input) works in the case of pro1.name in the above mentioned program but in the case of pro1.age it doesn't work. Whats wrong with it??? What's the solution to this problrm?? Plz help...