pset5 is the first pset so far that I've really struggled to understand. I've written the code, but I can't test the algorithms because everytime I run it I get "Unsupported file format"
// ensure infile is (likely) a 24-bit uncompressed BMP 4.0
if (bf.bfType != 0x4d42 || bf.bfOffBits != 54 || bi.biSize != 40 ||
bi.biBitCount != 24 || bi.biCompression != 0)
{
fclose(outptr);
fclose(inptr);
fprintf(stderr, "Unsupported file format.\n");
return 5;
}
Since check50 returns the same thing, I know it's not a problem with the bmp I'm using. Also, when using gdb it tells me the 2nd command line argument is "undefined" so I can't even go through it that way. Since I don't know where the problem is can I post my whole code, or send it to someone? Any help would be greatly appreciated.