Chinaunix首页 | 论坛 | 博客
  • 博客访问: 368915
  • 博文数量: 100
  • 博客积分: 2500
  • 博客等级: 大尉
  • 技术积分: 1209
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-15 21:24
文章分类

全部博文(100)

文章存档

2011年(100)

分类: C/C++

2011-04-22 08:58:38

  • whats a preprocessor in c
Preprocessor directives are lines included in the code of our programs that are not program statements but directives for the preprocessor. These lines are always preceded by a hash sign (#). The preprocessor is executed before the actual compilation of code begins, therefore the preprocessor digests all these directives before any code is generated by the statements.

These preprocessor directives extend only across a single line of code. As soon as a newline character is found, the preprocessor directive is considered to end. No semicolon (;) is expected at the end of a preprocessor directive. The only way a preprocessor directive can extend through more than one line is by preceding the newline character at the end of the line by a backslash (\).

macro definitions (#define, #undef)
Conditional inclusions (#ifdef, #ifndef, #if, #endif, #else and #elif)
Line control (#line)
Error directive (#error)
Source file inclusion (#include)
Pragma directive (#pragma)
阅读(1070) | 评论(1) | 转发(0) |
0

上一篇:singleton 类

下一篇:程序编译步骤

给主人留下些什么吧!~~

onezeroone2011-04-24 16:08:10

not program statements