Problems serializing a CString

I am trying to serialize a CArray of a class I made that has a member variable that is a CString.  None of the other member variables are a problem, just CString variables.  When I save a file, and then reload it, the CString variable is garbage.

Can I do this? / What is the trick?  Thanks in advance.
bluthiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Tommy HuiConnect With a Mentor EngineerCommented:
The general answer is to use CArchive::ReadString() and CArchive::WriteString() to serialize CStrings.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.