C/C++ tips

stdout/in/err streams in C and C++

#include <stdio.h>
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;

#include <unistd.h>

The following symbolic constants shall be defined for file streams:

STDERR_FILENO File number of stderr; 2.
STDIN_FILENO File number of stdin; 0.
STDOUT_FILENO File number of stdout; 1.