how to change this to c++??

this is objective-c code:
NSString *className = [GSGGUI_Shared getClassNameFromDescription:item];
Class cls = nil;

    if(!(cls = NSClassFromString(className)))
    {
    
    }

@swordmanwj

C++ doesn’t support reflection which mean you can’t do something like convert a Class name to a real Class.

You could refer to ObjectFactory class in the editor/cocostudio module for more information about how to implement the reflection in c++.

@0owen thks~