How to get a FILE pointer from a file descriptor?

前端 未结 3 1420
我寻月下人不归
我寻月下人不归 2020-12-07 14:17

I\'m playing around with mkstemp(), which provides a file descriptor, but I want to generate formatted output via fprintf(). Is there an easy way t

3条回答
  •  被撕碎了的回忆
    2020-12-07 15:16

    There is no standard way of doing this (or the reverse) as the C Standard has nothing to say about file descriptors. Your specific platform may or may not provide such a mechanism.

提交回复
热议问题