The Standard Error Stream

To send output to the standard error device, use cerr instead of cout. You can use this technique to send messages to the screen from programs that have their standard output redirected to another file or device.