-2
我得到一个警告:不能在Objective C到预警响应
RS232Msg无法 回应 “-initWithRS232MsgRawEncoded”
代码为
-(void)createMessage
{
RS232Msg* pMsg;
//pMsg = new RS232MsgRawEncoded(static_cast<int>nMessageNumber); in cpp
pMsg = [pMsg initWithRS232MsgRawEncoded:(int)nMessageNumber];
}
initWithRS232MsgRawEncoded
是RS232Msg
的派生类。 和pMsg
是指向RS232Msg
的指针。 createMessage是一种在RS232Msg中声明的方法如何使其访问?