MFC中出现初始化常量被截断,如何解决?
if(!m_mscomm.get_PortOpen())return;charch_Locked[22]={0x24,0x4d,0x3c,0x10,0xc8,0xde,0...
if(!m_mscomm.get_PortOpen()) return;
char ch_Locked[22]={0x24,0x4d,0x3c,0x10,0xc8,0xde,0x05,0xde,0x05,0x6c,0x07,0xe8,0x03,0xde,0x05,0xde,0x05,0xde,0x05,0xde,0x05,0x58};
m_mscomm.put_Output(COleVariant(ch_Locked));
}
这是一个控件响应函数,想把ch_Locked中的字符以16进制发送出去,但调试总有警告C4309:截断常量值。应该是数据转换出问题了,哪位大神能帮我解决下,小弟菜鸟一个,不胜感激! 展开
char ch_Locked[22]={0x24,0x4d,0x3c,0x10,0xc8,0xde,0x05,0xde,0x05,0x6c,0x07,0xe8,0x03,0xde,0x05,0xde,0x05,0xde,0x05,0xde,0x05,0x58};
m_mscomm.put_Output(COleVariant(ch_Locked));
}
这是一个控件响应函数,想把ch_Locked中的字符以16进制发送出去,但调试总有警告C4309:截断常量值。应该是数据转换出问题了,哪位大神能帮我解决下,小弟菜鸟一个,不胜感激! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询