我收到以下代码的错误.
@interface event : NSObject
{
NSMutableDictionary m_cAppIdMap; //error:statically allocated instance of Objective C
}
@end
Run Code Online (Sandbox Code Playgroud)
我通过事件实现中的函数create将对象设置为字典.
[m_cAppIdMap setObject:pEvent forKey:[NSNumber numberWithUnsignedInt:wTimerId]]; //Error:Cannot convert to a pointer type
Run Code Online (Sandbox Code Playgroud)
这是我在字典上设置结构对象的方式.pEvent是包含5个字段的结构,wTimerId是无符号短整数(key).
| 归档时间: |
|
| 查看次数: |
196 次 |
| 最近记录: |