C版IsNumric()

bool  IsNumric(CString  &  sSrc) {
    LPCSTR pSrc 
= (LPCSTR)sSrc;
    
for(int i=0; i < sSrc.GetLength(); i++ ){
        
if(pSrc[i]<"0" I|| pSrc > "9"){
            
return false;
        }

    }

    
return true;
}

你可能感兴趣的:(c)