xcode总是报错expected identifier or '(
-(void)gengerate {
int a = 1 + arc4random() % 9;
int b = 1 + arc4random() % 9;
int sum = a + b;
struct label.text = [NSString stringWithFormat: @"%d + %d = ", a, b];
struct label.tag = sum;
}
在struct label.text = [NSString stringWithFormat: @"%d + %d = ", a, b];
和struct label.tag = sum;的后面
我是照书抄的呀,原文
label.text = [NSString stringWithFormat: @"%d + %d = ", a, b];
label.tag = sum;
然后经过xcode提示改成了这样,结果还是有问题