Search code examples
c++iostreamstdio

Convert istream to FILE*


Is it possible to convert an istream like std::cin to a FILE *? A cross-platform solution would be a plus.

EX: (FILE *)std::cin.


Solution

  • No, there is no standard way to obtain a FILE* from an IOStreams stream, nor vice versa.