Solved

Problems serializing a CString

Posted on 1999-01-06
1
215 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:bluthi
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1327317
The general answer is to use CArchive::ReadString() and CArchive::WriteString() to serialize CStrings.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now