I write a parser for some data structure, after hours of debugging I found out that the problem is Visual Studio doesn\'t interpret the structures as I tell it. It seems som
Use the #pragma pack directive for that:
#pragma pack
#pragma pack(push, 1) struct foo { // etc.. }; #pragma pack(pop)