zackeel
asked on
I need a hex2str or hex2int function.
Hi,
I am in need of a function to transform hex strings (for ex: "1cf3bei4") to their
equivalent strings or unsigned long int.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi! A little error:
use unsigned long HexStr2Long(const char* szHexStr)
instead of long HexStr2Long(const char* szHexStr)
use unsigned long HexStr2Long(const char* szHexStr)
instead of long HexStr2Long(const char* szHexStr)
ozo, why do you insist on posting perfectly good answers as comments?
Well, I actually seem to have made a typo of scanf for sscanf,
But I figure it's up to the questioner to determine what's a perfectly good answer,
and I'd rather err on the safe side than have a reputation of posting
perfectly poor comments as answers.
And in this case, I didn't think I could give a complete answer,
not knowing what zackeel meant by «equivalent strings» for "1cf3bei4"
But I figure it's up to the questioner to determine what's a perfectly good answer,
and I'd rather err on the safe side than have a reputation of posting
perfectly poor comments as answers.
And in this case, I didn't think I could give a complete answer,
not knowing what zackeel meant by «equivalent strings» for "1cf3bei4"
i=strtoul("1cf3bei4",(char