#import <Foundation/Foundation.h>
@interface Student : NSObject
-(void)Dothing;
@end
#import "Student.h"
@interface Student ()
-(void)Sleep;
@end
#import "Student.h"
@implementation Student
-(void)Dothing
{
NSLog(@"Dothing");
}
-(void)Sleep
{
NSLog(@"Sleep");
}
@end
#import <Foundation/Foundation.h>
#import "Student.h"
//#import "Student_Sleep.h"
int main(int argc, const char * argv[])
{
@autoreleasepool
{
Student *stu=[[Student alloc] init];
[stu Dothing];
[stu Sleep];
}
return 0;
}
时间: 2024-10-09 22:58:25