From wiki :
- First two bytes are identifier( type of image )
- Next 4 bytes are Size of BMP
- Next 4 bytes are unused
- Next 4 bytes are offset where Pixel array is
- Next 4 bytes are number of bytes in DIB header
- Next 4 bytes is the width of the bitmap
- Next 4 bytes is the height of the bitmap
The highlighted part is what you need. So the other, just read it into a temporary variable. I suggest you read it into a char. A char in C++ is 1 byte usually. So think a little and you should get it.