为了避免同一个文件被include多次
1 #ifndef方式
2 #pragma once方式
在能够支持这两种方式的编译器上,二者并没有太大的区别,但是两者仍然还是有一些细微的区别。
“C++”目录存档
#pragma once与 #ifndef的区别
2008年11月26号,星期三no newline at end of file
2008年11月2号,星期天GCC中如果文件最后不加上一行空行的话,就会冒个warning:no newline at end of file。
在《Rationale for the C99 standard》一文中,有C99的相关信息:
A backslash immediately before a newline has long been used to continue string literals, as well as preprocessing command lines. In the interest of easing machine generation of C, and of transporting code to machines with restrictive physical line lengths, the C89 Committee generalized this mechanism to permit any token to be continued by interposing a backslash/newline sequence.