OSDN Git Service

修复int范围最大值的typo
authorXTh3G4p <haohu.shen@ucalgary.ca>
Fri, 23 Aug 2019 14:51:50 +0000 (08:51 -0600)
committerGitHub <noreply@github.com>
Fri, 23 Aug 2019 14:51:50 +0000 (08:51 -0600)
原内容为 $2^{32} - 1$
修改后为 $2^{31} - 1$

docs/lang/var.md

index 5b89c91..5297a92 100644 (file)
@@ -16,7 +16,7 @@ C++ 内置了六种基本数据类型:
 | 类型     | 字节数   | 范围                                              |
 | ------ | ----- | ----------------------------------------------- |
 | char   | 1 个字节 | -128 到 127 或者 0 到 255                           |
-| int    | 4 个字节 | -2147483648 到 2147483647( $2^{32} - 1$ )        |
+| int    | 4 个字节 | -2147483648 到 2147483647( $2^{31} - 1$ )        |
 | float  | 4 个字节 |  $-3.4\times 10^{38}$ 到 $3.4\times 10^{38}$     |
 | double | 8 个字节 |  $-1.7\times 10^{-308}$ 到 $1.7\times 10^{308}$  |