Table of Contents
1. Overview .......................................................................................................................................... 1
1.1. Character sets ..................................................................................................................... 1
1.2. Initial processing................................................................................................................ 2
1.3. Tokenization....................................................................................................................... 4
2. Header Files..................................................................................................................................... 9
2.1. Include Syntax ................................................................................................................... 9
2.2. Include Operation............................................................................................................... 9
2.3. Search Path....................................................................................................................... 10
2.4. Once-Only Headers.......................................................................................................... 11
2.5. Computed Includes .......................................................................................................... 12
2.6. Wrapper Headers ............................................................................................................. 13
2.7. System Headers................................................................................................................ 13
3. Macros............................................................................................................................................ 15
3.1. Object-like Macros........................................................................................................... 15
3.2. Function-like Macros ....................................................................................................... 16
3.3. Macro Arguments ............................................................................................................ 17
3.4. Stringification................................................................................................................... 19
3.5. Concatenation .................................................................................................................. 20
3.6. Variadic Macros ............................................................................................................... 21
3.7. Predefined Macros ........................................................................................................... 23
3.10. Macro Pitfalls................................................................................................................. 30
3.10.1. Misnesting....................................................................................................... 30
4. Conditionals................................................................................................................................... 37
4.1. Conditional Uses.............................................................................................................. 37
4.2. Conditional Syntax .......................................................................................................... 37
4.2.1. Ifdef................................................................................................................... 37
4.2.2. If........................................................................................................................ 38
4.2.3. Defined.............................................................................................................. 39
4.2.4. Else.................................................................................................................... 40
4.2.5. Elif..................................................................................................................... 40
4.3. Deleted Code.................................................................................................................... 41
Need help?
Do you have a question about the ENTERPRISE LINUX 4 - USING CPP and is the answer not in the manual?
Questions and answers