Use cerr to output error information : cerr « Development « C++ Tutorial






#include <iostream>
using namespace std; 
int main(void){ 
  int i;

  for (i = 1; i <= 100; i++)
     cerr << "Can't redirect cerr " << i  << '\n';
}








5.8.cerr
5.8.1.Use cerr to output error information