File read
-
Hi, I am trying to read a binary file that has an array of n numbers from the hard disk. I want to store these numbers in an array then display in a Edit box. Any suggestions? kash
Do you know the structure of the file? Is it a serialized CArray, or some other class? I usually just use an ifstream, and the >> operator. But then again, I know ahead of time what I'm looking for in the file... - Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
-
Do you know the structure of the file? Is it a serialized CArray, or some other class? I usually just use an ifstream, and the >> operator. But then again, I know ahead of time what I'm looking for in the file... - Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
-
It's a 1 * n matrix (i.e. a column of number, size n) of varying precision generated by an external program to my MFC project. I guess I could find the size of the array by counting the elements. kash
if you have access to the output algorithm, that would certainly help. I know it would be a nightmare if I gave someone one of my binary files and said "here, read this", without knowing how I built it. :rolleyes: I guess the key question is if they are serializing the object as a whole, or simply exporting the data within the array. If it is the latter, you could use a std::vector and just pump the values back in. - Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb