? ? ? ?[stu1 empty];?? ? ? [stu1 hello:(*stu1)._name];?? ? ? [stu1 hello2];?? ? double y= [stu1? add:17 and:17.4];? ? ? ? ? ? ? NSLog(@"%f",y);? ? //類方法通過類名去調(diào)用?? ? ? [Student hahhaha];? ? ? //可以將alloc和init一起使用?? ? ? Student *stu2=[[Student alloc]init];? ? ? ? stu2->_name=@"小明";? ? ? double x= [stu2 add:53 and:35.6];?? ? ? NSLog(@"%f",x);?? ? ? }這是截取一個程序的一小段,????請幫忙解釋以下[stu1 hello:(*stu1)._name]這里的方括號什么意思,如果看不懂就算了,請幫忙發(fā)一個學習oc的網(wǎng)址過來,謝謝!??!
- 1 回答
- 0 關(guān)注
- 1151 瀏覽
添加回答
舉報
0/150
提交
取消