while((*++ptr > '0' ) && (*++ptr <= '9' ) )
{
、、、、、、、、、、、
}
或者
while((*ptr++ > '0' ) && (*ptr++ <= '9' ) )
{
、、、、、、、、
}
估计这是个容易忽略的错误,特此铭记。
因为前一个++会对后一个++产生影响,导致错误,所以当这种判断时,最好改为
while((*ptr > '0')&&(*ptr < '9'))
{
、、、、、、、、、、、
i++;
}