C:如何从文件描述符更改为FILE结构,反之亦然? [英] C : how can i change from file descriptor to FILE struct and visa versa?
本文介绍了C:如何从文件描述符更改为FILE结构,反之亦然?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法改变的文件描述符FILE结构和/或更改文件结构到文件用C描述符
is there any way to change File descriptor to FILE struct or/and change FILE struct to File descriptor in C
推荐答案
功能 fdopen()
返回一个新的(FILE *)。
The function fdopen()
returns a new (FILE *) associated with an open file descriptor.
功能的fileno()
返回打开的文件关联的文件描述符*。
The function fileno()
returns the file descriptor associated with an open FILE *.
这篇关于C:如何从文件描述符更改为FILE结构,反之亦然?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文