How to retrieve bits from a file using MFC
-
I am writing a code to read the bits from the file. Starting from first bit, i can read the whole file, and can retrieve the whole data as well. But if i want to retrieve the bits from somewhere between the file, how should i do this? One more thing, i am doing a string comparision of a module(and that module repeats several times in the file) and then i am retrieving the bits hence i can,t apply character counting.
It was a woman who drove me to drink but I never got opportunity to thank her
-
I am writing a code to read the bits from the file. Starting from first bit, i can read the whole file, and can retrieve the whole data as well. But if i want to retrieve the bits from somewhere between the file, how should i do this? One more thing, i am doing a string comparision of a module(and that module repeats several times in the file) and then i am retrieving the bits hence i can,t apply character counting.
It was a woman who drove me to drink but I never got opportunity to thank her
dubeypankaj wrote:
But if i want to retrieve the bits from somewhere between the file, how should i do this?
It depends on how you are reading your file. Are you using an ifstream, a FILE, a CFile, ... ? Typically, you can set the file pointer (e.g. CFile::Seek, ifstream::seekg, ...). You should look at the documentation for more information.
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++ -
I am writing a code to read the bits from the file. Starting from first bit, i can read the whole file, and can retrieve the whole data as well. But if i want to retrieve the bits from somewhere between the file, how should i do this? One more thing, i am doing a string comparision of a module(and that module repeats several times in the file) and then i am retrieving the bits hence i can,t apply character counting.
It was a woman who drove me to drink but I never got opportunity to thank her