I have a text file with a hex value in each line. Sort of
80000000 08000000 0a000000
Now I am writing C ++ code to read this directly. Something like
fstream f(filename, ios::in); while(!f.eof) { int x; char ch; f>>std::hex>>x>>ch;
Now this does not work as expected. Although some digits are filled in properly, the ch logic is wrong. Can someone tell me the correct way to do this. I need to fill the array with an int equivalent.
source share