[晕] 居然还有这种东西:C++ Trigraph
Posted by bianbian on 2007-08-01 03:34
本文Tags: Trigraph
听说为了照顾某些键盘坏了又换不起的,可以使用这种3字符的串来代替一些特殊字符,preprocess的时候会替换掉:
#: ??=
\: ??/
^: ??’
[: ??(
]: ??)
{: ??<
}: ??>
|: ??!
~: ??-
于是程序就这样了:
- //: S03:trigraph.cpp
- ??=include <iostream>
- int main(int argc, char* argv??(??)) ??<
- using namespace std;
- unsigned int n;
- if (argc != 2 ??!??! (n = atoi(argv??(1??))) <= 0)
- return 1;
- cout << ??-(n ??' 0xf0f0) << '??/n';
- return 0;
- ??>
我就奇怪了,键盘换不起,眼睛换换就那么便宜吗?
标签: Trigraph遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道
相关日志
Posted in C/C++, Technology | 2 Comments »