File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1232,7 +1232,7 @@ Sleep(MilliSeconds(3));
12321232this_thread::sleep_for(chrono::seconds(3));
12331233```
12341234
1235- 如果你 ` using namespace std::literials ; ` 还可以这样快捷地创建字面量:
1235+ 如果你 ` using namespace std::literals ; ` 还可以这样快捷地创建字面量:
12361236``` cpp
12371237this_thread::sleep_for (3ms); // 3 毫秒
12381238this_thread::sleep_for(3s); // 3 秒
Original file line number Diff line number Diff line change @@ -3051,10 +3051,10 @@ QString str = codec->toUnicode(bytes);
30513051#### 字符串常量
30523052
30533053```cpp
3054- QString str = QStringLiterial ("你好,世界");
3054+ QString str = QStringLiteral ("你好,世界");
30553055```
30563056
3057- ` QStringLiterial ` 可以保证,转换时采用的是所谓“运行字符集”(实际应该叫字面量字符编码),也就是我们开发者电脑上的“区域设置”,是编译期确定的。而如果写 ` QString::fromLocal8Bits("") ` 就变成 “ANSI”,客户的“区域设置”了。这两个字符编码,比如在之前跨国 galgame 的案例中,就是不同的。
3057+ ` QStringLiteral ` 可以保证,转换时采用的是所谓“运行字符集”(实际应该叫字面量字符编码),也就是我们开发者电脑上的“区域设置”,是编译期确定的。而如果写 ` QString::fromLocal8Bits("") ` 就变成 “ANSI”,客户的“区域设置”了。这两个字符编码,比如在之前跨国 galgame 的案例中,就是不同的。
30583058
30593059#### QTextStream
30603060
You can’t perform that action at this time.
0 commit comments