fork download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3. #import <Foundation/Foundation.h>
  4.  
  5. @implementation TestObj
  6. int main()
  7. {
  8. NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  9. const char bytes[] = "\x00\x12\x45\xAB";
  10. size_t length = (sizeof bytes) - 1; //string literals have implicit trailing '\0'
  11. NSData *data = [NSData dataWithBytes:bytes length:length];
  12.  
  13. NSLog(@"%@", data);
  14. [pool drain];
  15.  
  16. return 0;
  17. }
  18. @end
Success #stdin #stdout #stderr 0.03s 42848KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2015-08-28 07:24:37.269 prog[13473] <001245ab>