Character.forDigit((c>>4)&0xF, 16) I'm trying to convert some Java code to C++. 95% of the way there but the above Java code has stumped me.
As I understand it, forDigit in Java determines the character representation for a specific digit in the specified radix, in this case.
c in the above code can be anything other than alphanumeric
I've been playing with atol (atol(c.c_str()) >> 4 & 0xF) but this does not give me the desired outcome.
Any pointers would be great!
https://stackoverflow.com/questions/66739467/character-fordigit-in-c March 22, 2021 at 10:05AM
没有评论:
发表评论