Predefined macro names


Today doing some researching I found out the following macro names are defined at any time:

  • __LINE__: Integer value representing the current line in the source code file being compiled.
  • __FILE__: A string literal containing the presumed name of the source file being compiled.
  • __DATE__: A string literal in the form "Mmm dd yyyy" containing the date in which the compilation process began.
  • __TIME__: A string literal in the form "hh:mm:ss" containing the time at which the compilation process began.
  • __cplusplus: An integer value. All C++ compilers have this constant defined to some value. If the compiler is fully compliant with the C++ standard its value is equal or greater than 199711L depending on the version of the standard they comply.

Comentarios

Entradas populares