![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
yky189
这个作者很懒,什么都没留下…
展开
-
移位和加减运算符的处理
wCRCin = (wCRCin>>8) + (wCRCin<<8);getCrc16 = (data[step]<<8) + data[step+1];这些地方需要加(),否则无法得到正确的数值原创 2020-04-04 23:23:25 · 201 阅读 · 0 评论 -
c语言同一行变量重复改变
startAddr = data[step++] + data[step++]<<8;count = data[step++] + data[step++]<<8; IAR报这个错误:变量“step”(在第182行声明)(或通过某种间接方式得到的值)被修改了不止一次,没有插入Warning[Pa079]: undefined behavior: variable “...原创 2020-04-04 23:21:10 · 552 阅读 · 0 评论 -
指针作为形参赋值
void testPoint(int *p,int a){ *p = a;} int test1 = 200; int test2 = 0; testPoint(&test2,test1); test1 = 50; qDebug()<<test2; 输入test2 = 200;这里是给test2指针所指向的地址赋值。另外一种错误的写法:这里是把a...原创 2019-12-14 14:32:51 · 1114 阅读 · 0 评论