[box]

Ans

void CreateNewFile()

{

Game g1;

ifstream fin;

ofstream fout;

fin.open(“GAME.DAT”,ios::in|ios::binary);

fout.open(“BASKET.DAT”,ios::out|ios::binary);

while(!fin.eof())

fin.read((char*)&g1,sizeof(g1));

if(strcmp(g1.GameName,”Basket Ball”)==0)

fout.write((char*)&g1.sizeof(g1));

}

fin.close();

fout.close();

}

 

[/box]
Rate Us
error: Content is protected !!