Share via


_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

另請參閱

資料流 I/O