Share Pastebin
Guest
Public paste!

rsesek

By: a guest | Dec 21st, 2009 | Syntax: C++ | Size: 0.44 KB | Hits: 70 | Expires: Never
Copy text to clipboard
  1. #include <string>
  2. #import <Foundation/Foundation.h>
  3.  
  4. class TestClass
  5. {
  6.   int foo_;
  7.   std::string bar_;
  8. };
  9.  
  10. int main(void)
  11. {
  12.   const char* type = @encode(TestClass*);
  13.   NSLog(@"%s", type);
  14. }
  15.  
  16.  
  17. ------------------------------------------------
  18.  
  19. $ g++ test.mm -lobjc -framework Foundation
  20. $ ./a.out
  21. 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=*}}}