Solved

Cross conversion of int and CStrings in VC++ 5.0

Posted on 1998-12-27
1
181 Views
Last Modified: 2010-04-16
I am building a neural net using numerically indexed file names and I need to be able to convert from ints to CStrings. Currently I am getting some strange results using the CString (int) function for conversion. Help.
0
Comment
Question by:Gareon
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 1181074
That's not too difficult, use the following code:
int nMyInt;
CString strMyInt;

nMyInt = 4;// for example ;-)

strMyInt.Format( "%d", nMyInt);

This should work ;-)

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

785 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