我通过fread()
有一个错误的原因和它说: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)
我该怎么办?我的程序中已经包含<stdio.h>
。我目前正在使用Visual C++ MFC开发我的项目。
Bertrand是有点正确,虽然不帮助:)因为你不提供任何上下文,我们可以确认什么是断言。 [断言不坏](http://pragprog.com/the-pragmatic-programmer/extracts/tips)。 – sehe 2011-03-16 13:05:43
你的fopen()调用失败,你忘了检查。 – 2011-03-16 13:50:31