C++:fread()导致断言错误?

Chi*_*eno 0 c++

我有一个错误原因fread(),它说:

File: f:\ dd\vctools\ crt_bld\ self_x86\ crt\ src\fread.c
Line: 102
Expression: (stream != NULL)
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
Run Code Online (Sandbox Code Playgroud)

我该怎么办?我已经加入<stdio.h>了我的计划.我目前正在使用Visual C++ MFC开发我的项目.

Ber*_*ron 6

Expression: (stream != NULL) 解释一切.

你传递的是一条NULL小溪fread,你不应该这样做.