Solved

show an integer in a messagebox

Posted on 2001-08-24
4
921 Views
Last Modified: 2008-01-09
I want to know how to turn an integer into character to display from a message box:

NewFile.nPolys is the integer (part of a structure) that i want to insert at the end of the string "The number of polys is ".

MessageBox(NULL, <this is the function i want to use>, "whassup", NULL);

thanks
0
Comment
Question by:MitchBroadhead
[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
4 Comments
 
LVL 3

Accepted Solution

by:
MDarling earned 50 total points
ID: 6421513
char s[1000];

wsprintf(s,"The number of polys is %d",NewFile.nPolys);
MessageBox(NULL,s,"Whassup",NULL);

Regards,
Mike.
0
 
LVL 3

Expert Comment

by:MDarling
ID: 6421515
1000 chars is a bit overkill though :)

40 should do fine.

Regards,
Mike.
0
 
LVL 2

Expert Comment

by:bkdc
ID: 6421564
....
 int q=1002;
 char buff[50];
 _itoa(q,buff,10);  //_itoa(int no,char &,int radix);
 MessageBox(NULL, buff, "whassup", NULL);
....


0
 
LVL 1

Author Comment

by:MitchBroadhead
ID: 6421585
thanks darling.
worked a treat.  
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
thread-safe code in c++ 2 128
Better understanding on C++ Class serialization and formats 9 105
sorting efficency of sorting algorithm 30 151
Gaming Software 1 38
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

739 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