Search code examples
c++qtbinaryfilesrandom-access

Reading data from a Binary/Random Access File


I have a file in binary format having a large amount of data.

If I have knowledge of the file structure, how do I read information from the binary file, and populate a record of these structures?

The data is complex.

I'd like to do it with Qt, but I would do it in C++ as well, if required.

Thanks for your help..


Solution

  • http://courses.cs.vt.edu/~cs2604/fall00/binio.html would be help for you. I've learned from there. (hint always cast your data as(char*) ).