#import #include #include @interface StudyPlan : NSObject - (int)completed; @end @implementation StudyPlan - (int)completed { return 3; } @end int main(void) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; StudyPlan *plan = [[StudyPlan alloc] init]; printf("%d\n", [plan completed]); [plan release]; [pool drain]; return 0; }