Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt Creator macro

 

Qt Creator has some macro's supplied ( although these are actually supplied by the GCC).

 

#include <iostream>

int main()
{
  std::cout
    << "Date: "     << __DATE__     << '\n'
    << "File: "     << __FILE__     << '\n'
    << "Function: " << __FUNCTION__ << '\n'
    << "Line: "     << __LINE__     << '\n'
    << "Time: "     << __TIME__     << '\n';
}

 

Screen output:

 

Date: Dec 14 2010
File: ../CppQtMacro/main.cpp
Function: main
Line: 9
Time: 13:09:53

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict