rsesek
By: a guest | Dec 21st, 2009 | Syntax:
C++ | Size: 0.44 KB | Hits: 70 | Expires: Never
#include <string>
#import <Foundation/Foundation.h>
class TestClass
{
int foo_;
std::string bar_;
};
int main(void)
{
const char* type = @encode(TestClass*);
NSLog(@"%s", type);
}
------------------------------------------------
$ g++ test.mm -lobjc -framework Foundation
$ ./a.out
2009-12-21 13:31:20.446 a.out[15964:903] ^{TestClass=i{basic_string<char,std::char_traits<char>,std::allocator<char> >={_Alloc_hider=*}}}