2.1.6.5 Bin2Dec


Description

Convert bin string to int number.

Syntax

int Bin2Dec( LPSTR lpszBin )

Parameters

lpszBin
[input] bin string.

Return

returns numeric from bin string if successfully.

Examples

EX1

void Bin2Dec_ex1()
{
    string str = "1010";
    char* pchar = str.GetBuffer(20);
    int nn = Bin2Dec(pchar);
    out_int("",nn); // output 10
}

Remark

See Also

Hex2Dec, Byte2Hex

Header to Include

origin.h

Reference