I am reading the header of a file and I know to use an unsigned char of 8 bits but what about an 8 byte portion of the header? Do I use an unsigned char or unsigned unsigned char* for data types. I would think if I know the specific size I use an array and if it changes during runtime to dynamically allocate it, but generally what should I use.
Also I see that the fread function from the C standard library reads into a (void *) data type while the fstream class reads it into a char*. Is it safe to cast an unsigned char* into a char* or should I start off using a char* from the beginning even if it might affect the reading of the byte.