reading binary file with header

hi,

im trying to read a binary file with header. so i manage to read the header by calling this:

fread(&headers, sizeof(MtexHeader), 1, fp);

the header contains the size of the real content. i call those content by calling this line:

fread(out, sizeAccordingToHeader, 1, fp);

but it always returns me an error. it gives me bad access. any1 know whats wrong?

thanks inadvance
You need to give more information. Like, much more.
Topic archived. No new replies allowed.