现在在做C++ 与OC 混编
C++ 的类比如为
class A{
void *t;
}
在OC中赋值给t 赋值一个数组,比如
A->t = (NSArray *)array;
现在错误提示是:
assigning to 'void *' from incompatible type 'NSArray'
如何解决这个问题哩
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
把这句代码所在的源文件后缀名改成.mm并import Foundation。
后缀是OC++的.mm么
Nsarray换成id试试