I'm trying to read a bitmap header and according to the specifications I have done it correctly. The section of the header that contains the size of the bitmap file has an offset of 2 bytes and is 4 bytes long, however whenever I run this program it states the size is "6". The actual size of the bitmap is 192kb.
Are there any decent tutorials to reading bitmaps (cross-platform, so no Win32 LoadBitmap() function)? I've googled but had no luck.
fread( size, sizeof(char), 4, file); size is already a pointer. I don't know what will happen if you lie in the size of the cell (maybe endianness issues).
You could also try to use std::fstream