Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MFC way for _int64 into CString conversion and CStrimg into _int64

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 49
ODBC Connection Logging, ADO.NET 6 69
format the code in java 6 101
fizzArray2 challenge 1 88
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

792 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