int funs(const char *str)
{
unsigned int x;
std::stringstream ss;
ss << std::hex << str;
ss >> x;
// output it as a signed type
std::cout << static_cast(x) << std::endl;
return static_cast(x);
}
#define HEXSTR2INT(str) funs(str)
调用:
cout<



