Windows模拟UNIX atoh()函数

Nic*_*lin 4 windows mfc

在Windows API或MFC中有任何模拟atoh()功能吗?

atoh() 将包含十六进制数字的字符串转换为无符号数字

unsigned x = atoh("A");
Run Code Online (Sandbox Code Playgroud)

操作后x = 10.

在Windows中我有一个CString,包含"A".我怎样才能将它转换为int?

act*_*.se 6

long x = strtoul("A", (char **) NULL, 16);
// x will be 10 decimal
Run Code Online (Sandbox Code Playgroud)