30:16
#import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *name = @"World"; if (argc>1) { name = [[[NSString alloc] initWithBytes:argv[1] length:strlen(argv[1]) encoding:NSUTF8StringEncoding] autorelease]; } NSLog(@"Hello, %@", name); [pool drain]; return 0; }
No comments:
Post a Comment