易截截图软件、单文件、免安装、纯绿色、仅160KB

C preprocessor

http://en.wikipedia.org/wiki/C_preprocessor
C preprocessor
from Wikipedia, the free encyclopedia
Jump to:navigation, search
The C preprocessor (cpp) is the preprocessor for the C programming language. In many C implementations, it is a separate program invoked by the compiler as the first part of translation. The preprocessor handles directives for source file inclusion (#include), macro definitions (#define), and conditional inclusion (#if). The language of preprocessor directives is agnostic to the grammar of C, so the C preprocessor can also be used independently to process other types of files.
The transformations it makes on its input form the first four of C's so-called Phases of Translation. Though an implementation may choose to perform some or all phases simultaneously, it must behave as if it performed them one-by-one in order.
Contents
[hide]
1 Phases
2 Including files
3 Conditional compilation
4 Macro definition and expansion
4.1 Standard predefined positioning macros
4.2 Precedence
4.3 Multiple lines
4.4 Multiple evaluation of side effects
4.5 Token concatenation
4.6 Semicolons
4.6.1 Multiple statements
4.7 Quoting macro arguments
4.7.1 Indirectly quoting macro arguments
4.8 Variadic macros
4.9 X-Macros
4.10 Compiler-specific predefined macros
5 User-defined compilation errors and warnings
6 Compiler-specific preprocessor features
7 As a general-purpose preprocessor
8 See also
9 References
10 External links
[edit] Phases
The following are the first four (of eight) phases of translation specified in the C Standard:
Trigraph Replacement - The preprocessor replaces trigraph sequences with the characters they represent.
Line Splicing - Physical source lines that are continued with escaped newline sequences are spliced to form logical lines.
Tokenization - The preprocessor breaks the result into preprocessing tokens and whitespace. It replaces comments with whitespace.
Macro Expansion and Directive


相关文档:

Ubuntu linux系统下安装C kermit串口工具

解决步骤:
gylu@dell-desktop:~$ sudo apt-get install ckermit
显示安装过程
gylu@dell-desktop:~$gedit ~/.kermrc
输入下面内容后保存.kermrc退出:
   set line            /dev/ttyS0
    set speed    & ......

linux常用c函数 文件权限控制篇

access(判断是否具有存取文件的权限)
  相关函数  stat,open,chmod,chown,setuid,setgid
  表头文件  #include<unistd.h>
  定义函数  int access(const char * pathname,int mode);
  函数说明  access()会检查是否可以读/写某一已存在的文件。参数mode有几种情况组合,R_OK ......

关于C/C++中内存空间的划分

CAPTION: 关于C/C++中内存空间的划分
AUTHOR: aIsland 摘自中国IT实验室
DATE: 2010-05-30
E-MAIL: aIsland@live.cn
QQ: 418662213
P.S.
     1.Bolanlan|随心high|aIsland 三个网名均为本人
     2.声明aIsland 所收录的所有文章其著作权都属于原创作者
   ......

用c实现背包问题(贪心)

好久以前做的一个程序,贪心策略实现背包问题,c实现。
总结在这里,以备以后和别人查找。
//背包问题
#include "stdio.h"
#define MAX 10
void main()
{
 int w[MAX]={0,10,130,15,60,25};      //存放质量
 int v[MAX]={0,30,5,10,20,25};   //存放价值
 flo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号