Programming Tips - C/C++: convert a string holding a hex number to an int

Date: 2012jun18 Language: C/C++ Level: beginner Keywords: hexadecimal Q. C/C++: convert a string holding a hex number to an int A.
int number = strtol(str, NULL, 16);