Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以只使用C编写fopen()、fscanf()或fprintf()函数?_C - Fatal编程技术网

是否可以只使用C编写fopen()、fscanf()或fprintf()函数?

是否可以只使用C编写fopen()、fscanf()或fprintf()函数?,c,C,我对图书馆的职能没有异议。我知道他们工作得很好。我对它们的实施感兴趣。我的问题是:我可以只使用C编写Windows x64的这些函数的工作版本吗?许多标准库函数都是用C编写的,fopen,fread等也不例外。您可以围绕open、read、write等编写包装,这些通常是较低级别的函数 如果这些功能不可用,您也可以执行相同的操作,调用相应的操作系统功能并用您自己的实现包装它们,您只需确保它们符合标准 例如,您可以找到您可能感兴趣的fopen的源代码:

我对图书馆的职能没有异议。我知道他们工作得很好。我对它们的实施感兴趣。我的问题是:我可以只使用C编写Windows x64的这些函数的工作版本吗?

许多标准库函数都是用C编写的,
fopen
fread
等也不例外。您可以围绕
open
read
write
等编写包装,这些通常是较低级别的函数

如果这些功能不可用,您也可以执行相同的操作,调用相应的操作系统功能并用您自己的实现包装它们,您只需确保它们符合标准

例如,您可以找到您可能感兴趣的
fopen

的源代码: