Lets say I have some raster data I want to write to a file.. Now I want to write it as a bmp file..
This data happens to be not DWORD aligned, which, if I understand correctly, needs to be padded with enough bytes to reach the next DWORD..
However, when I try to pad it with this code:
bmFile.Write(0x0, (4-(actualWidth%4)));
I get an error.. If I try to debug (I'm using MSVC++ 6.0), the next statement points to an ASSERT in CFile::Write that asserts the first parameter is NULL.. So this fails..
How should I pad it? should I write out:
bmFile.Write("0x0"(4-(actualWidth%4)));
instead? or would this be treated literally...?
Thanks..