-
The output I get :
--------------
Name=ginoitalo
Date=9
Phone=13281
--------------
End of file = 88
Size of applicant = 88
Records in file=1
--------------
Name=ginoitalo
Date=9
Phone=13281
--------------
So, why aren't we getting the same output ?
I'm interested
-
Now your second version runs fine, Im not basing you but your first one didnt work, evident by the screen i posted. On some systems if you try to read from a fstream object that was declared as in and out then it will mess up and read garbage.
-
That's odd,
since fstream is ostream & ifstream
I guess in theory it should work fine
but (as always) in testing it doesn't always pan out.
Nice Post Everyone
-
In a perfect implementation it should, but when you are talking about microsoft then you shouldnt have high expectations and expect full functionality.
-
If I wanted to save a STL map object in binary format and then when the program is run later how would my program tell how many bytes to read in? Would I have to right a int to difine how many bytes then write my map to file so that I could read the size of the map back in so I'd know what size of map was going to be?
Would that work and/or is there an easier way?