流沙雨帘

关注

error: Semantic Issue: Interface type cannot be statically allocated

流沙雨帘

关注

阅读 94

2023-02-19


 error: Semantic Issue: Interface type cannot be statically allocated

出现这个错误的原因是

 

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

 

Car car = [[Car alloc] init];

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


相关推荐

boom莎卡拉卡

Error: ‘list‘ object cannot be coerced to type ‘double‘

boom莎卡拉卡 121 0 0

朱小落

错误:ERROR Cannot read properties of null (reading ‘type‘)

朱小落 53 0 0

一枚路过的程序猿

SIP Registration , IO Error issue

一枚路过的程序猿 17 0 0

Star英

Clang 'constexpr' specifier is incompatible with C++98 [Semantic Issue]

Star英 147 0 0

彩虹_bd07

type 与 interface 的区别

彩虹_bd07 102 0 0

艾晓雪

type和interface的区别

艾晓雪 75 0 0

皮皮球场

Oracle故障处理:RMAN-06091: no channel allocated for maintenance (of an appropriate type)

皮皮球场 61 0 0

骨灰级搬砖工

TS中type和interface的区别

骨灰级搬砖工 47 0 0

妖妖妈

TypeScript中type和interface的区别

妖妖妈 66 0 0

Android开发指南

typescript中interface和type的区别

Android开发指南 59 0 0

精彩评论(0)

0 0 举报