I have the following program:
#include
#include
#include
#define MAXLEN 100
typedef struct {int key; char
I have also had same kind of problem while reading BIOS parameter block structure from a floppy disk image. I resolved it by using #pragma pack(1) directive. Sample code is below:
#pragma pack(1)
struct bpb
{
unsigned char jmpinstruction[3];
unsigned char oem[8];
short bytespersector;
....
};
#pragma pack()