Amazon.com Widgets 19.1
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2013, 02:13:04 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Program Examples
| | |-+  Chapter 19
| | | |-+  19.1
Pages: [1]   Go Down
Print
Author Topic: 19.1  (Read 1124 times)
mdeh
Full Member
***
Posts: 166






« on: March 03, 2009, 07:20:34 PM »

Code: (Objective-C)
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSAutoreleasePool.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSDictionary *glossary = [NSDictionary dictionaryWithObjectsAndKeys:@"A class defined so other classes can inherit from it. ", @"abstract class", @"To implement all the methods defined in a protocol", @"adopt", @"Storing an object for later use", @"archiving",nil];

if([glossary writeToFile: @"glossary" atomically: YES] == NO)
NSLog(@"Save to file failed");
[pool drain];
    return 0;
}
« Last Edit: March 04, 2009, 07:10:22 PM by mdeh » Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.