E.8 Predefined Symbolic Constants
There are six predefined symbolic constants (Fig. E.1). The identifiers for each of these begin and (except for __cplusplus
) end with two underscores. These identifiers and preprocessor operator defined
(Section E.5) cannot be used in #define
or #undef
directives.
Fig. E.1 The predefined symbolic constants.
Symbolic constant | Description |
---|---|
__LINE__ |
The line number of the current source-code line (an integer constant). |
__FILE__ |
The presumed name of the source file (a string). |
__DATE__ |
The date the source file is compiled (a string of the form "Mmm dd yyyy" such as "Aug 19 2002" ). |
__STDC__ |
Indicates whether the program conforms to the ANSI/ISO C standard. Contains value 1 if there is full conformance ... |
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.