String problem

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
lincsimp
Posts: 21
Joined: Sat Mar 12, 2005 10:11 pm

String problem

Post by lincsimp »

Hey
Why doesn't this work?

core::stringw str = L"Collision detection example - Irrlicht Engine ["
+ driver->getName()
+ "] FPS:"
+ fps;

It works with most other string classes I've seen...

Cheers
lila

Post by lila »

Please post the error msg...
in my case it works!

lila
lincsimp
Posts: 21
Joined: Sat Mar 12, 2005 10:11 pm

Post by lincsimp »

Mingw gives me:

main.cpp invalid operands of types `const wchar_t[48]' and `const wchar_t*' to binary `operator+'

Thanks
Dodge
Posts: 9
Joined: Fri Aug 05, 2005 7:20 am

Post by Dodge »

use

core::stringw str = L"Collision detection example - Irrlicht Engine [";
str += driver->getName();
str += "] FPS:";
str += fps;


then it shold work :D


btw if u using the tutorials then read carfully and no mistakes happen :D
lincsimp
Posts: 21
Joined: Sat Mar 12, 2005 10:11 pm

Post by lincsimp »

It was no mistake, I copied it from that tut :) ... its just it works with most other string classes...
Post Reply