How to convert string to stringw

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
Go|iath
Posts: 12
Joined: Fri Dec 24, 2010 11:00 pm

How to convert string to stringw

Post by Go|iath »

...so yea,

how can I convert string to stringw ?

I've looked around for about 1 or 2 hours (I stopped counting the time once I became insane) and I can't still figure this out.

...thanks for any help.

...if anyone got pills against insanity I would use some right now.


PS : any info on how to convert a float/int to a stringw would also solve my problem.
Go|iath
Posts: 12
Joined: Fri Dec 24, 2010 11:00 pm

Post by Go|iath »

I never asked this question.

...this was a joke.

Stop looking at me.

Code: Select all

float fltvalue = 20.00001;
irr::core::stringw myString = "Float value = ";
myString += fltvalue;
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

For anyone still interested in doing these conversions instead of directly assigning the values:

Both int/floating point conversion and stringc to stringw conversion are done the same way

Code: Select all

// The two strings
core::stringc string1;
core::stringw string2;

// Assign a value to the first string
string1 = "This is a string";

// Convert the first string to a wide string
string2 = core::stringw(string1);

Post Reply