Some functions go beyond the ANSI standard. These are disabled when you use std=c++11 (or std=c++0x).
Among them are fdopen, fileno and strdup. There are two possibilities to use them:
Use the GNU dialect (std=gnu++11).
If you want to compile without dialect and make a local exception, you can include stdio.h with the __STRICT_ANSI__ undefined.
I have tested both on Suse Linux Enterprise 11, MinGW and Cygwin.