unsigned int bin2int (std::string strBin)
{
unsigned int i = 0;
const char *pch = strBin.c_str();
while (*pch == '0' || *pch == '1') {
i <<= 1;
i |= *pch++ - '0';
}
return i;
}
unsigned int bin2int (std::string strBin)
{
unsigned int i = 0;
const char *pch = strBin.c_str();
while (*pch == '0' || *pch == '1') {
i <<= 1;
i |= *pch++ - '0';
}
return i;
}