I have a string like this:
\"00c4\"
And I need to convert it to the numeric value that would be expressed by the literal:
0
std::string val ="00c4"; uint16_t out; if( (std::istringstream(val)>>std::hex>>out).fail() ) { /*error*/ }