c++ - Converting a string representing binary to a string representing equivalent hex -
so have string x = "10101" , need put string y hex value of binary in x. if x="10101" y="0x15"
i don't want provide complete answer.
that said, basic idea should fill start of string 3 zero's can split string substrings length of 4. can turned hex variety of ways, easiest being using switch case statement. there 16 cases'
Comments
Post a Comment