Solved

show an integer in a messagebox

Posted on 2001-08-24
4
903 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
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
MDarling earned 50 total points
Comment Utility
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
Comment Utility
1000 chars is a bit overkill though :)

40 should do fine.

Regards,
Mike.
0
 
LVL 2

Expert Comment

by:bkdc
Comment Utility
....
 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
Comment Utility
thanks darling.
worked a treat.  
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 learn how to clear a vector as well as how to detect empty vectors in C++.

772 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

8 Experts available now in Live!

Get 1:1 Help Now