Okay, i am really having trouble understanding how to save/load a file. I am pretty new to c++ not a complete newbie but still a newbie. Anyways my save function works fine but i can't get the load funtion to work. this is what i have for the save function

void save()
{
ofstream fout; //used to open file for writing

fout.open("sav.dat");
fout<<"stat.class name = "<<stat.classname<<"\nstat.hp ="<<stat.hp<<"\n";
fout<<"stat.maxhp = "<<stat.maxhp<<"\nstat.mp = "<<stat.mp<<"\n";
fout<<"stat.maxmp = "<<stat.maxmp<<"\nstat.attack = "<<stat.attack<<"\n";
fout<<"stat.defense = "<<stat.defense<<"\nstat.bons = "<<stat.bons<<"\n";
fout<<"stat.exp = "<<stat.exp<<"\nstat.level = "<<stat.level<<"\n";
fout.close();
cout<<"\n\n\n File Saved.\n\n";
system("pause");
menu();
} //end save

this works dandy, it's loading that's the problem, here is what i have

void load()
{
int data;
ifstream fin; //used for reading

fin.open("sav.dat");
while(!fin.eof())
fin>>data;
fin.close();

cout<<"\n\n File Loaded.\n\n";
system("pause");
menu();
} //end load

when i call the load function, it will just lag and never print "File loaded" to the screen. Does anyone have any suggestions, and i don't really understand pointers very good, is this possible w/out using them. Thanks.