STRING To HEX Converter

pico:

PaulS:

How to convert a text string "003C" to Hex value 0x003C ?

Use strtoul().

Or even better -- don't use strtoul(). In fact, don't use the C++ string library at all, if you can possibly avoid it.

strtoul was in C. What's wrong with it? It does the same thing as your code except probably faster because it's optimized and debugged.