#import
@interface
}
@property(nonatomic) int x,y;
@end
sss.m:
#import "sss.h"
@implementation sss
@synthesize x,y;
//-(NSString *)description{
//
//
//}
@end
main函数:
#import
#import "sss.h"
int main(int argc, const char * argv[])
{
}
输出结果如下(没有重写description函数):
2013-04-09 17:15:31.787 147[281:303] Hello, World!
2013-04-09 17:15:31.789 147[281:303] 4,5
2013-04-09 17:15:31.789 147[281:303]
重写后的输出结果如下:
2013-04-09 17:16:54.189 147[294:303] Hello, World!
2013-04-09 17:16:54.191 147[294:303] 4,5
2013-04-09 17:16:54.191 147[294:303] xinglianting