I have the following program:
#include
#include
#include
#define MAXLEN 100
typedef struct {int key; char
It's storing the data as binary records, not plain text.
You won't be able to view it using notepad.
To view the records, you'll have to write another program that reads records from the file into the same structure.
Several reasons:
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()