problem in reading file

i want to read this hex values from a file "8F 78 C6 12 BA 98 A2 16" and put this value in a variable long long and to ignore the separators to be the value like this long long temp=0x8f78c612baa216;
how i can do this thanks in advance :)
hi,
I'm not shore but string class may help you.
1
2
string val;
val.append();


to read values use ifstream class.

then convert string to long( don't know how).
Last edited on
Use a char buffer to read 8 bytes from the file, then just cast to long long. Beware about the endianness. (little endian vs big endian).
Topic archived. No new replies allowed.