Page 1 of 1

String problem

Posted: Thu Aug 04, 2005 6:22 pm
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

Posted: Fri Aug 05, 2005 8:31 am
by lila
Please post the error msg...
in my case it works!

lila

Posted: Fri Aug 05, 2005 10:09 am
by lincsimp
Mingw gives me:

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

Thanks

Posted: Fri Aug 05, 2005 2:32 pm
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

Posted: Fri Aug 05, 2005 3:18 pm
by lincsimp
It was no mistake, I copied it from that tut :) ... its just it works with most other string classes...