Cross conversion of int and CStrings in VC++ 5.0

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.
GareonAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
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
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.