//io with multiple objects #includeclass person { protected: char name[40]; int age; public: void getdata(void) { cout<<"\nEnter name: ";cin>>name; cout<<"\nEnter age : ";cin>>age; } void showdata(void) { cout<<"\n Name: "< >ch; }while(ch=='y'); file.seekg(0); file.read((char *)&pers,sizeof(pers)); while(!file.eof()) { cout<<"\nPerson: "; pers.showdata(); file.read((char *)&pers,sizeof(pers)); } }