#import <Foundation/Foundation.h>
@interface ListNode : NSObject
@property (nonatomic, assign) NSInteger value;
@property (nonatomic) ListNode *next;
@end
@implementation ListNode
- (void)test {
printf("aaa");
}
- (instancetype)initWithNumber:(NSInteger)number {
self = [super init];
if (self) {
self.value = number;
}
return self;
}
@end
int main(int argc, char* argv[]) {
ListNode *node = [[ListNode alloc] initWithNumber:3];
[node test];
return 0;
}