//
// main.m
// Day01_类的练习_Student
//
// Created by imac on 2020/9/7.
// Copyright ? 2020 imac. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Student : NSObject
{
@public
NSString *_name;
int _age;
int _sex;
}
@end
@implementation Student
@end
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
Student * s1 =[Student new ];
s1->_name=@"jack";
s1->_age=12;
s1->_sex=1;
NSLog(@"学生名字叫%@,年龄是%d,年纪是%d",s1->_name,s1->_age,s1->_sex);
}
return 0;
}