fgetc()返回值是int而不是char
其实是个很简单的常识,居然搞了我半个小时……
fgetc()的返回值是int,因为这个值除了返回拿到的字符之外,还兼作错误标志。由于fgetc()允许文件中包含任意内容,所以只好增大返回值的宽度来表达。
共 2 篇文章。
其实是个很简单的常识,居然搞了我半个小时……
fgetc()的返回值是int,因为这个值除了返回拿到的字符之外,还兼作错误标志。由于fgetc()允许文件中包含任意内容,所以只好增大返回值的宽度来表达。
junsu and I have discussed about some big hacks to FreeBSD kernel, and the implementation of a minidump is a good idea, I think.
On Windows there’s a minidump mechanism. The minidump will save ‘crashing’ pages only, while full dump will save the whole core memory when the system going to crash.