unsigned char 不行转换成COleVariant用串口发送出去?
m_Com.SetOutput(COleVariant(m_SendComm)); // 发送数据
//m_SendComm[7]是unsigned char型的,因为m_SendComm[0]=0xff,则非要用unsigned类型,但是用串口发送却有错误。有什么办法啊,我只想把m_SendComm[7]发送出去,谢谢。
错误如下:
D:\工作\src_demo\Server\TM4KLIBTestDlg.cpp(2276) : error C2440: 'type cast' : cannot convert from 'unsigned char [7]' to 'class COleVariant'