show an integer in a messagebox

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
LVL 1
MitchBroadheadAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MDarlingConnect With a Mentor Commented:
char s[1000];

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

Regards,
Mike.
0
 
MDarlingCommented:
1000 chars is a bit overkill though :)

40 should do fine.

Regards,
Mike.
0
 
bkdcCommented:
....
 int q=1002;
 char buff[50];
 _itoa(q,buff,10);  //_itoa(int no,char &,int radix);
 MessageBox(NULL, buff, "whassup", NULL);
....


0
 
MitchBroadheadAuthor Commented:
thanks darling.
worked a treat.  
0
All Courses

From novice to tech pro — start learning today.