#include <iostream> #include <stdlib.h> #include <string.h> int main() { char a[2] = "A"; char b[2] = "6"; strcat(a,b); int x = strtol(a, NULL, 16); std::cout << x << std::endl; return 0; }