actually the problem is when storing the data.
when we try to retake the data , data is not found
struct rooms
{
int totrooms;
int *roomnums;
}rs;
constructor()
{
roomnums=new int(0);
void getdata()
{
cin>> totrooms;
rs.roomnums=new int(rs.totrooms);
for(int i=0;i<rs.totrooms;i++)
{
cin>>rs.roomnums[i];
file sr.write(.....);
}
this code will work but only once