Incrementing a uint8_t variable, strange outcome

前端 未结 0 664
清歌不尽
清歌不尽 2021-01-28 17:00

In a C++ class I\'ve the following code/while loop:

uint8_t len = 0;

while (*s != \',\') {
    len = (uint8_t)(len + 1u);
    ++s;
}
return (len);
相关标签:
回答
  • 消灭零回复
提交回复
热议问题