#include <errno.h>
/* compress until end of file */
do {
strm.avail_in = fread(in, 1, CHUNK, source);
errno; //<-----DEBUGGER "CXX0017: Error: symbol errno not found"
perror("Error:");
if (ferror(source)) //<--ferror = 32 but there is no string from perror?
{
//error handling
views:
55answers:
1
+1
A:
When you build with the DLL version of the CRT (/MDd for example), errno is a macro. Translating it to a function call to obtain the shared value of errno. Fix it like this:
int err = errno;
so you can inspect the value of err.
Hans Passant
2010-07-16 20:07:19
Awesome! Thank You! ( err = 9 )
Tommy
2010-07-16 20:32:59