|
1) You're getting the errors (the only ones you mention in your post) because the pointer returned by new is not a valid pointer for free. Again, use delete.
2) Yup. The problem with writing the structure out en masse is that padding bytes may or may not be present with different compilers run on different systems. It's a portability issue.
|