首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

objective c 兑现继承 笔记

2012-06-27 
objective c 实现继承 笔记?////main.m//BaseTest////Created by cheng deng on 11-8-26.//Copyright 2011

objective c 实现继承 笔记

?

////  main.m//  BaseTest////  Created by cheng deng on 11-8-26.//  Copyright 2011年 __MyCompanyName__. All rights reserved.//#import <Foundation/Foundation.h>@interface shuma :  NSObject  {@private    }- (void) areyou;@end@implementation shuma- (void) shuma{    NSLog(@"i am shuma product");}@end@interface  Computer: shuma {@private}@end@implementation Computer- (void) shuma{    NSLog(@"i am a computer");}@endint main (int argc, const char * argv[]){    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];    Computer *c = [Computer new];    [c shuma];    NSLog(@"test");        [pool drain];    return 0;}

?

热点排行