2.1.6.18 Hex2Dec


Description

Convert hex string to int number.

Syntax

int Hex2Dec( LPSTR lpszHex )

Parameters

lpszHex
[input] hex string.

Return

returns numeric from hex string if successfully.

Examples

EX1

void Hex2Dec_ex1()
{
    string str = "2A";
    char* pchar = str.GetBuffer(20);
    int nn = Hex2Dec(pchar);
    out_int("",nn); // output 42
}

Remark

See Also

Header to Include

origin.h

Reference