insted of "int" in sizeof(int) use sizeof(stat) or whatever is the name of the reference variable.
here is some sample code... [not tested]
Code:
struct statistics
{
char name[15];
int hp;
int h;
}stat;
void save()
{
fstream fout; //used to open file for writing
cout<<"ENTER NAME : ";
cin.getline(stat.name,15,'/n');
cout<<"ENTER HIT POINTS : ";
cin>>stat.hp;
cout<<"ENTER HEALTH : ":
cin>>stat.h;
fout.open("sav.dat",ios::app);
fout.write((char*)&stat,sizeof(stat));
fout.close();
cout<<"\n\n\n File Saved.\n\n";
system("pause");
menu();
} //end save
void load()
{
fstream fin; //used for reading
cout<<"SAVED DATA OF PLAYERS\n\n";
fin.open("sav.dat",ios::in);
fin.read((char*)&stat,sizeof(stat));
while(!fin.eof())
{
cout<<"NAME : "<<stat.name<<"\n";
cout<<"HIT POINTS : "<<stat.hp<<"\n";
cout<<"HEALTH : "<<stat.h<<"\n\n\n";
fin.read((char*)&stat,sizeof(stat));
}
fin.close();
cout<<"\n\n File Loaded.\n\n";
system("pause");
menu();
} //end load