Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert INT to CString

Posted on 1998-12-22
2
Medium Priority
?
438 Views
Last Modified: 2013-11-20
I have an integer stored in integer variable i ( example int i=1)

I have a string stored in CString variable (example CString def="D")

Now, i want a new CSTRING variable called FINAL defined as the older CString called def plus the integer i.

In other words, i want a CString variable called final that contains, following the example, the string  "D1"

How can i do that??

THANKS ALL!!

0
Comment
Question by:Sol
[X]
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
2 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 80 total points
ID: 1326584
CString final;

final.Format(_T("%d"), i);
final = def + final;

0
 
LVL 1

Expert Comment

by:The_Brain
ID: 1326585
char buffer[x];

strcat(Def, _itoa(i , buffer, 10));
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 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