MFC way for _int64 into CString conversion and CStrimg into _int64

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

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

Question by:khlauster
  • 2
  • 2
LVL 86

Accepted Solution

jkr earned 100 total points
ID: 16952705

#include <stdlib.h>

__int64 i1 = 42L;
CString tmp;

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

__int64 i2 = _atoi64((LPCTSTR)tmp);

Author Comment

ID: 16952835
Works great!

One more thing:

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

thanks, Jkr!
LVL 86

Expert Comment

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

Author Comment

ID: 16953546
thanks again

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Separate files macro - Errors on larger data set 18 65
Process filename extension 3 172
sumDigits challenge 9 124
only14 challenge 19 68
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

896 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

13 Experts available now in Live!

Get 1:1 Help Now