i need to let the user input the details of 10 or less ppl. and the information to be stored in th program. i need to delare an array of 10 ppl and an integer that will hold the numbr of ppl so far.
the program should consist of two loops th 1st loop should continue repeating round and allows the user to enter the next person until the array is full up or the user decides to stop. the 2nd loop is shold print out all the dtails entered by the user.
Main Topics
Browse All Topics





by: meow00Posted on 2003-12-07 at 15:22:04ID: 9893472
Hello,
---------- ----- ---------- -----
I am not quite sure what u need, but several things :
1.
-----------------------
void person:rint()
{
cout << age<<endl;
}
----------------------
should be "void person::print()". typo ?
2. In main, the declaration of person is not proper. I would change to :
--------------------------
int main()
{
person PPL[10];
int num_stored;
for(int i=0; i<10;i++){
PPL[i].input() ;
}
return 0 ;
}
--------------------------
It would be good if u can describe more clear about what u need !
meow ....