
please wait
|
|
Employee
has a C++ string which is is a pointer to a structure that holds your charaters. When you do file.write(...)
you are writing the value of the pointer for the strings. Reading it back in populates the string with that value of that pointer which could be pointing to anything which is what is causing your error. file.write
but write out each value.