so i set up the following structure in my document class header
then I declare the following in the document class header fileCode:struct header { short NumBytesPerSample; bool BigorLittleEndian; float VoltsPerDigitizerUnit; };
Code:CFile Datafile; header hdr; header *phdr;
This is the code i have to open the file, and to load the structure with the first 7 bytes of the opened file..
is this correct?
I know that the first 7 bytes will be a short (2 bytes) a bool (1 byte) and a float (4 bytes)Code:phdr = &hdr; Datafile.Read(phdr,7);
I'm not sure if this is correct, cause my professor doesn't really teach us anything. he just leaves us guessing... i've never done windows programming till now.. it's always been console based.. and fairly simple too..
Also, how can i make my own file to test this?
Thanks,