处理方法:发现代码中有对文件的读取,但对应磁盘没有那个文件,于是加上,搞定
反思:果然还是没有error checking 的设计啊
思路来源和原理:
在stackoverflow上搜索到以下:
It sounds like fp
is NULL. The most likely reason is that one of the files (or both) do not exist, or can't be opened (for example, because some other process is using it).
I would start by adding some error checking after the two fopen()
calls: compare the result to NULL
and if it is NULL
, examine errno