Could somebody point me in the right direction of how I could read a binary file that is defined by a C struct? It has a few #define inside of the struct, which makes me thing t
Using C++ I/O library:
#include using namespace std; ifstream ifs("file.dat", ios::binary); Format f; ifs.get(&f, sizeof f);
Using C I/O library:
#include using namespace std; FILE *fin = fopen("file.dat", "rb"); Format f; fread(&f, sizeof f, 1, fin);