Advertisement

VC Newbie question

Started by August 16, 2000 07:42 AM
3 comments, last by LaBasX2 24 years, 3 months ago
Hi, I''ve written several (small) engines in Delphi and now I want to convert them to VC5. But since I''m new to C, I still have many problems. The first thing which is important and I don''t know is how to display an int-var in a MessageBox; e.g. I want to display a text (for ex. "number :") followed by an int-var; how do I convert this var to be a char? Thanks
Use the function sprintf();
Advertisement
Try the itoa function.

Breakaway Games

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Thanks for your help!
Or with C++ cout. No conversion needed, all''s done automatically.

header: iostream.h
usage: cout << "Number: " << MyNumber << "\n";

EL

----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
----------------------------------------"Inash neteia haeg joa kavari quilm..." SD4

This topic is closed to new replies.

Advertisement