hello, i have a hex valued string that is saved in a text file. I want to get it into a c style include format to just copy and paste into my code. i tried using xxd that has a feature to do that but for some reason when i use my file it takes that string (it considers it non hex) and further converts it into hexadecimal.
anyway around this or an easier way to do this in c++. I am not sure. pretty new to c++ and just learning here.
sample of the contents of the file are as follows:
AFAB2591CFB70E77C7C417D8C389507A541D0350752EE9E8C12D76E8674677C166A5ACA65ECFDE7EC90DC8E7D6D621438FEF7DD38B0EDEA3D44BDB9D6E7E1CA0FBA30B507EA70B2A52434F64092EC13BD12F8F1C2BED6EE1ADE7
so getting it like 0xAF, 0xAB etc is what i am looking for.
i also noticed that when i use xxd even if i just put A in the file...its result is 410a. I don't understand that either. is it showing a word rather than just a byte?