GAMEDEV.NET
String to const char conversion
I need to make a const char* system, but there're some problems.I registering const char like this:void ConstructConstCharString(string* thisPointer, const char* ptr){ new(thisPointer) string(ptr);}const char* StringToConstChar(string& str){ return str.c_str();}RegisterStdString(engine);engine->RegisterObjectType("charptr", sizeof(const char*), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_PRIMITIVE);engine->RegisterObjectBehaviou
0 Поделились
26 Просмотры