Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

show an integer in a messagebox

Posted on 2001-08-24
4
Medium Priority
?
930 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 200 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

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

721 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