一、有一个账号类:Account如下
#import
typedef struct
{
int year;
int month;
int day;
int hour;
int minute;
int second;
} registerDate ;
@interface Account : NSObject
@property(nonatomic,retain)NSString *userName;
@property(nonatomic,retain)NSString *password;
@property(nonatomic,assign)registerDate date;
@end
#import “Account.h”
@implementation Account
- (void)dealloc
{
[_userName release];
[_password release];
NSLog(@“账号挂了。。。”);
[super dealloc];
}
@end
二、有一个作者类:User如下
#import
#import “Account.h”
typedef struct
{
int year;
int month;
int day;
int hour;
int minute;
int second;
