Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) std::clog

 

std::clog (abbreviation of 'character log stream') is a stream for logging information.

 

#include <iostream>

int main()
{
  std::cout << "Start of program\n";
  std::clog << "Log message: now in middle of program\n";
  std::cout << "End of program\n";
}

 

Screen output:

 

Start of program
End of program

 

Qt Creator IDE output (while in debugging mode):

 

Log message: now in middle of program
Start of program
End of program

 

 

 

 

 

 

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

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict