_getmaxstdio
この記事の内容
ストリーム入出力のレベルで許可されている、同時に開かれたファイルの数を返します。
int _getmaxstdio( void );
stdio
のレベルで現在許可されている、同時に開けるファイル数を表す数値を返します。
_setmaxstdio
を使用して、stdio
レベルで同時に開くファイルの数を構成します。
ルーチンによって返される値 | 必須ヘッダー |
---|---|
_getmaxstdio |
<stdio.h> |
互換性の詳細については、「 Compatibility」を参照してください。
// 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