Converting int to string

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Converting int to string

Post by Tyn »

Hey

General C++ question here: Does anyone know of a way to convert an integer to a string? I don't want to convert back again, just to show the contents of an integer in a label in Irrlicht ( which is w_char IIRC ). I tried googling it but didn't get much.

Cheers
deps
Posts: 115
Joined: Sat Jan 10, 2004 5:22 pm
Location: Tranås, Sweden

Post by deps »

Look at how they show the FPS in the tutorials
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Code: Select all

wchar_t your_string[255];
swprintf(your_string, 255, L"%d", (int)your_integer);
If you want to google it for more info "swprintf c++"
Crud, how do I do this again?
Post Reply