Hello,
I have a class set up and operating well with several strings, and
a few doubles or ints. I can set and retrieve these values without any
trouble by using member functions. Now I am trying to write the class out
to disk using fwrite and read it in using fread. It writes and reads with
no errors. However, while the numbers are read back in successfully the
char strings are not. I think that when the class is being initialized
with default values the size of the class is set constant. Now when I set
the variables to custom values could that change the sizeof the class?
Thus making fread read in the wrong number of bytes? (Am I even lucid
here?) Should I use a struct instead? Write out each char string
separately? What is the best method?
Thanks for the attention.
Joseph
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Joseph Martin: | [EMAIL PROTECTED] |
| Amateur C Programmer, | http://users.exis.net/~jam/ |
| Web Designer, | |
| All around tech nut | |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=