cppreference.com > C/C++ Pre-processor Commands > Predefined preprocessor variables
Predefined preprocessor variables
Syntax:
  __LINE__
  __FILE__
  __DATE__
  __TIME__
  _cplusplus
  __STDC__

The following variables can vary by compiler, but generally work: