long myProject::Convert2To10(CString strBuff)
{
long num = 0, sum = 0;
int nLen = strBuff.GetLength();
for ( int i = 0; i < nLen; i++ )
{
num = ( strBuff.GetAt(i) - 48 );
num = num * (long)pow( 2, nLen - i - 1 );
sum += num;
}
return sum;
}