error: Semantic Issue: Interface type cannot be statically allocated

来源:互联网 发布:读图软件免费下载 编辑:程序博客网 时间:2024/05/18 13:42

 error: Semantic Issue: Interface type cannot be statically allocated

出现这个错误的原因是

 

接口声明对象时(我这么一说,大家应该懂我意思吧),必须声明为引用,即指针

 

Car car = [[Car alloc] init];

改为 Car *car = [[Car alloc] init];

阅读全文
0 0
原创粉丝点击