I need to use an existing C library in a C++ project. My problem is the C existing library uses FILE* as streams, is there a standard compliant way to use FILE* streams to put or to get from C++ streams?
I tried seeking FILE* in the C++11 standard, but it appears only if few examples.
-
EDIT, example.
We have a function which write in a FILE*:
fputs(char const*, FILE*)
We have an output C++ stream:
auto strm = std::cout;
Can I, in a standard compliant way, to use fputs to write to strm?
You can also think a similar input example with a C function that reads from a FILE* and a input C++ stream.