![]() |
1
17
|
![]() |
2
6
避免trigraph意外的简单方法:将“?”字符串文本一分为二:
编辑
引用标准 5.2.1.1 Trigraph sequences 1 Before any other processing takes place, each occurrence of one of the following sequences of three characters (called trigraph sequences13)) is replaced with the corresponding single character. ??= # ??) ] ??! | ??( [ ??' ^ ??> } ??/ \ ??< { ??- ~ No other trigraph sequences exist. Each ? that does not begin one of the trigraphs listed above is not changed. 5.1.1.2 Translation phases 1 The precedence among the syntax rules of translation is specified by the following phases. 1. Physical source file multibyte characters are mapped, in an implementation-defined manner, to the source character set (introducing new-line characters for end-of-line indicators) if necessary. Trigraph sequences are replaced by corresponding single-character internal representations. |
![]() |
3
5
这是一个 Trigraph ! |
![]() |
4
4
|
![]() |
5
4
那是 trigraph
|
![]() |
7
3
Trigraphs 这就是原因。文中的C语言也适用于C++ |
![]() |
8
2
如前几次所述,你被三角描记器咬伤了。有关更多信息,请参见上一个SO问题: 您可以通过使用“?”字符的“\?”转义序列来解决此问题:
事实上,这就是逃逸序列的原因,如果你不知道那些该死的三角图,这就有点神秘了。 |
![]() |
JoeZ · Do while循环不会中断 6 年前 |
![]() |
JoeZ · 如果循环不工作。运行时显示重复cout。 6 年前 |
![]() |
Joe · 正在展开宏以进行调试? 6 年前 |
|
Matthew · 自己编译公共库会提高性能吗? 6 年前 |
![]() |
Barry · 在MSVC中处理宏中的额外括号 6 年前 |