this->_label = CCLabelTTF::labelWithString(number,“Artial”, 32);
WHERE int number = 5, but must be const char
can anybody help me with this?
this->_label = CCLabelTTF::labelWithString(number,“Artial”, 32);
WHERE int number = 5, but must be const char
can anybody help me with this?
you can convert int to a const char*, just like:
char string[32];
sprintf(string, “%d”, number);
label = CCLabelTTF::labelWithString(string,“Artial”, 32);
jni/…/…/Classes/HelloWorldScene.cpp:104: error: invalid conversion from ‘char’ to ‘char**’
jni/…/…/Classes/HelloWorldScene.cpp:104: error: initializing argument 1 of ’int sprintf’
jni/…/…/Classes/HelloWorldScene.cpp:105: error: invalid conversion from ’char’ to ’const char**’
it works, thanks