- (void)setCScore:(int)cScore
{
_cScore = cScore;
}
- (int)cScore
{
return _cScore;
}
@end
int main()
{
//Score *s = [Score new];
//[s setCScore:8];
// NSLog(@"这个数值是%d", [s cScore]);
Student *s = [Student new];
[s setCScore:8];
NSLog(@"这个数值是%d", [s cScore]);
//[Student test];
}
后面漏写的补上 |