小编Koe*_*en 的帖子

c:这条线做什么?

我读了一些代码并且遇到了这个相当神秘的语法:

size_t count = 1;
char *s         = "hello you";
char *last_word = "there";

count += last_word < (s + strlen(s) - 1); #line of interest
Run Code Online (Sandbox Code Playgroud)

不知何故,计数增加了.但我认为<运算符会返回true或false.这条线做什么?

c addition operator-precedence compound-assignment relational-operators

2
推荐指数
1
解决办法
111
查看次数