Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- typedef struct objc_class {
- struct objc_class *isa;
- } *Class;
- extern "C" Class objc_getClass(const char* pszName);
- extern "C" const char* class_getName(Class cls);
- int main(int argc, char** argv)
- {
- Class pClass = objc_getClass("Object");
- if (pClass)
- {
- std::cout << "Got a class \"" << class_getName(pClass)
- << "\" (" << (void*)pClass << ")\n";
- }
- else
- std::cerr << "Unable to get a class named \"Object\", aborting...\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement