首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

工具检测代码报错不知何意解决思路

2013-07-04 
工具检测代码报错不知何意In this-m_MessageId ++this-m_MessageId % 255, this-m_MessageId is

工具检测代码报错不知何意
In "this->m_MessageId = ++this->m_MessageId % 255", "this->m_MessageId" is written in "this->m_MessageId" (the assignment left-hand side) and written in "++this->m_MessageId % 255" but the order in which the side effects take place is undefined because there is no intervening sequence point.
m_MessageId = ((++m_MessageId) % 0xff);


这是用工具对代码检测时工具报的错误信息


不太理解这个错的意思是什么(不是英文意思不懂..)


求大神解答
[解决办法]
this->m_MessageId = ++this->m_MessageId % 255;
this->m_MessageId在一个表达式语句中同时被赋值操作符和++操作符修改,两个修改顺序不同会得到不同的结果,因此这个表达式可能会因为使用的编译器不同而导致不同的结果。

热点排行