c++ - I want to convert the hex value in the character array to integer -
i want convert hex value in character array integer.
int main() { char arr[5]; arr[0] = 0x05; int = atoi(&arr[0]); cout << "number = " << a; //output = 0 want here value 5 }
you don't need conversion @ all:
int main() char arr[5]; arr[0] = 0x05; int = arr[0]; }
Comments
Post a Comment