Convert to struct
Posted: Sun Aug 19, 2007 12:23 pm
when i read data from the floppy disk i set a pointer to the memory location where it has been stored, how can i then read this data into a structure for my BPB as i keep getting either:
conversion to non scalar type requested
or
incompatible type in assignment
This is my structure:
conversion to non scalar type requested
or
incompatible type in assignment
This is my structure:
Code: Select all
typedef struct BOOT{
unsigned char jmp[3];
unsigned char OEM[7];
unsigned short bps;
unsigned char cluster_size;
unsigned short reserved;
unsigned char fats;
unsigned short dir_entrys;//
unsigned short total_sectors;//
unsigned char mds;
unsigned short secfat;
unsigned short sectrack;
unsigned short sides;
unsigned char hide[4];
unsigned char large[4];
unsigned char drive;
unsigned char flags;
unsigned char sig;
unsigned char volume_ID[4];
unsigned char volume_label[11];
unsigned char system_identifier[8];
unsigned char bootstrap[449];
unsigned short boot_sig;
}__attribute__ ((packed)) boot;