Possible duplicate:
C ++ convert hexadecimal string to signed integer
I already searched on google but did not find any help. So here is my problem: I have strings that allready contain hexadecimal code, for example: string s1 = "5f0066" and I want to convert this string to hex. I need to compare a string with the hex code I read in a binary.
(You just need the basic idea of ββhow to convert the string) 5f Best regards and thanks.
Edit: Got binary information in unsigned char format. SO its 0x5f ... It would be desirable if the string were in the same format
source share