Solved

MFC way for _int64 into CString conversion and CStrimg into _int64

Posted on 2006-06-21
4
677 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

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