docs(types): fix typo

This commit is contained in:
ruanyf
2021-09-27 13:51:18 +08:00
parent e731600acb
commit 3a8b6e4993

View File

@@ -599,7 +599,7 @@ if ((-a) < 0) printf("negative\n");
else printf("positive\n");
```
上面示例中,变量`a`是 unsigned char 类型这个类型不可能小于0但是`-a`会自动转为 int 类型,导致上面的代码输 negative。
上面示例中,变量`a`是 unsigned char 类型这个类型不可能小于0但是`-a`不是 unsigned char 类型,会自动转为 int 类型,导致上面的代码输 negative。
再看下面的例子。