error:static_cast undeclared->Objective C
Objective C:
[pPacket SetHeaderSequenceNumber:static_cast<char>(m_transmitSequenceNumber + ASCII_ZERO)];
cpp:
pPacket->SetHeaderSequenceNumber(static_cast <char>(m_transmitSequenceNumber + ASCII_ZERO));
error:static_cast undeclared.
改採用C
objective-c is a superset of c, not c++ so static_cast is not supported in it. You can just use c-style cast:
[pPacket SetHeaderSequenceNumber:(char)(m_transmitSequenceNumber + ASCII_ZERO)];
沒有留言:
張貼留言