![]() This is used to include headers provided by the implementation, such as the headers that compose the standard library ( iostream, string.). In the first case, a header is specified between angle-brackets. The preprocessor does not understand C++ proper, it simply replaces any occurrence of identifier by replacement. This replacement can be an expression, a statement, a block or simply anything. When the preprocessor encounters this directive, it replaces any occurrence of identifier in the rest of the code by replacement. To define preprocessor macros we can use #define. 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 ( \). No semicolon ( ) is expected at the end of a preprocessor directive. As soon as a newline character is found, the preprocessor directive is ends. ![]() These preprocessor directives extend only across a single line of code. The preprocessor examines the code before actual compilation of code begins and resolves all these directives before any code is actually generated by regular statements. These lines are not program statements but directives for the preprocessor. ![]() Preprocessor directives are lines included in the code of programs preceded by a hash sign ( #).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |