Solved

MFC way for _int64 into CString conversion and CStrimg into _int64

Posted on 2006-06-21
4
691 Views
Last Modified: 2013-11-20
Hi, experts!

Is there is a way to convert
 _int64 into CString
 and
 CStrimg into _int64

thanx
0
Comment
Question by:khlauster
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 16952705
Yes:

#include <stdlib.h>

__int64 i1 = 42L;
CString tmp;

tmp.Format("%I64d", i1);

__int64 i2 = _atoi64((LPCTSTR)tmp);
0
 

Author Comment

by:khlauster
ID: 16952835
Works great!

One more thing:

if any limitation for using  _int64 and these types of conversions:
OS,  etc

thanks, Jkr!
0
 
LVL 86

Expert Comment

by:jkr
ID: 16953147
Well, CString limits that conversion to MFC, but that's it basically.
0
 

Author Comment

by:khlauster
ID: 16953546
thanks again
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

770 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