[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Easy Archiving

Posted on 1998-08-10
3
Medium Priority
?
233 Views
Last Modified: 2010-04-02
I am using an archive to save a CString to a  text file.
When I open the file for viewing (NOTEPAD) there are
characters inserted at the beginning of the file.  What
are they and how can I get rid of them?
0
Comment
Question by:jrmcg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 1169833
An archive contains information use to recreate objects, not just the information in the objects.  Thus an archive of a CString contains more than text of the string.  it contains information that says that a CString is stored in the archive  (and other info as well.)
0
 
LVL 22

Expert Comment

by:nietod
ID: 1169834
You don't get rid of them.  But if you just want a file that has the contents of a string (or many strings), then you don't want an archive.  For that, you can use a C++ file stream and write the string to the file stream with the << operator.  The << operator for a file stream and a string will write the contents of the string only, it will not create an archive that indicates the type of data being written.

Let me know if you have questions.
0
 
LVL 2

Author Comment

by:jrmcg
ID: 1169835
Thanks Todd,

That is what I needed.

JR
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

650 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