_getmaxstdio
返回在 I/O 流级别允许同时打开的文件数。
语法
int _getmaxstdio( void );
返回值
返回一个表示在 stdio
级别当前允许同时打开的文件数。
备注
使用 _setmaxstdio
配置在 stdio
级别允许同时打开的文件数。
要求
例程 | 必需的标头 |
---|---|
_getmaxstdio |
<stdio.h> |
有关兼容性的详细信息,请参阅 兼容性。
示例
// crt_setmaxstdio.c
// The program retrieves the maximum number
// of open files and prints the results
// to the console.
#include <stdio.h>
int main()
{
printf( "%d\n", _getmaxstdio());
_setmaxstdio(2048);
printf( "%d\n", _getmaxstdio());
}
512
2048
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈