我在 VC++ 中用 fopen() 打开了很多文件,但过了一会儿就失败了.
可以同时打开的文件数量有限制吗?
C 运行时库对可以在任何时间打开的文件数有 512 个限制.尝试打开超过最大数量的文件描述符或文件流会导致程序失败.使用 _setmaxstdio 更改此数字.有关这方面的更多信息可以在此处 中阅读>
此外,您可能还需要检查您的 Windows 版本是否支持您尝试使用 _setmaxstdio 设置的上限.有关 _setmaxstdio 的更多信息,请查看此处
可以找到与 VS 2015 对应的主题的信息 这里
I'm opening lots of files with fopen() in VC++ but after a while it fails.
Is there a limit to the number of files you can open simultaneously?
The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use _setmaxstdio to change this number. More information about this can be read here
Also you may have to check if your version of windows supports the upper limit you are trying to set with _setmaxstdio. For more information on _setmaxstdio check here
Information on the subject corresponding to VS 2015 can be found here
这篇关于Windows 中打开文件的数量是否有限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Windows 中的 boost_1_60_0 .zip 安装boost_1_60_0 .zip installation in windows(Windows 中的 boost_1_60_0 .zip 安装)
如何使用 Windows 程序在 C++ 中获得控制台输出?How do I get console output in C++ with a Windows program?(如何使用 Windows 程序在 C++ 中获得控制台输出?)
如何计算给定日期的周数?How do I calculate the week number given a date?(如何计算给定日期的周数?)
带有网络摄像机的 OpenCVOpenCV with Network Cameras(带有网络摄像机的 OpenCV)
创建 DLL 时导出所有符号Export all symbols when creating a DLL(创建 DLL 时导出所有符号)
Windows 7 上的 OpenCV 2.4 和 MinGW 入门Getting started with OpenCV 2.4 and MinGW on Windows 7(Windows 7 上的 OpenCV 2.4 和 MinGW 入门)