i have this error:
C:\Program Files\Microsoft Visual Studio\MyProjects\nanana\main.cpp(65) : error C2664: 'addTextSceneNode' : cannot convert parameter 2 from 'char [21]' to 'const unsigned short *'
How to convert char type variable to a irrlicht-usable string? the L"somethinghere" type?
Conversion of CHAR
bal means - irr::core::stringw(name).c_str()
so -
then use wstr.c_str ( ) as your argument to the text for your TextSceneNode.
so -
Code: Select all
char name[21];
std::cout << "What is your name?" << endl;
std::cin >> name;
core::stringw wstr = name;