#import <Foundation/Foundation.h>
@interface Bird:NSObject
{
}- (void) eat;
- (void) sleep;@end@implementation Bird -(void)eat
{
NSLog(@"吃的方法");
} -(void)sleep
{
NSLog(@"睡的方法");
}@endint main(int argc, const char * argv[])
{
//@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
id b[0];
b[0]=[Bird new];
[b[0] eat];
//
return 0;
}
程序无法调用eat方法,提示break point求大神指教
@interface Bird:NSObject
{
}- (void) eat;
- (void) sleep;@end@implementation Bird -(void)eat
{
NSLog(@"吃的方法");
} -(void)sleep
{
NSLog(@"睡的方法");
}@endint main(int argc, const char * argv[])
{
//@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
id b[0];
b[0]=[Bird new];
[b[0] eat];
//
return 0;
}
程序无法调用eat方法,提示break point求大神指教
[bird eat];
[bird release];
break point是断点的问题,不是错误。