I have written a program to read hex from a txt file and to convert to binary and proceed to generate the result to a new txt file.
However, the program only able to convert the last line of the data.
I suspect it the data is not fully parsed.
I'm still at beginner-level, would appreciate on what I can do on the output conversion.
Thanks a lot.
****************************************************
This is a simple program to convert Hex to Binary.
****************************************************
Opening file for reading...
The file was opened successfully!
****************************************************
Hex numbers is :
1079FFFFB0F7FFFFFD13E7FFFEC1EC359FFFFF00
Hex numbers is :
1079FFFFB0F7FFFFFD13E7FFFEC27DE6FFFFFF00
Hex numbers is :
007FFFFF7037FFFFFD13E7FFFE7FFFFFFFFFFF00
Hex numbers is :
007FFFFF7037FFFFFD13E7FFFE7FFFFFFFFFFF00
Hex to binary value is :
00000000011111111111111111111111011100000011011111111111111111111111110100010011
11100111111111111111111001111111111111111111111111111111111111111111111100000000
Press any key to continue . . .
Every time you read a new line, you overwrite the last one. Either do the 'hex to binary' bit each time you read a new line (ideally, throw it in a function and just call it), or store each line in a vector and then iterate over it.