int _istdigit(TCHAR): to test if a string is a number.
int _ttoi(TCHAR*): is the same as atoi, change a string into a int.
if ( _istdigit( strServiceName[0] ) ) { nPortNumber = (USHORT) _ttoi( strServiceName ); } |
int _istdigit(TCHAR): to test if a string is a number.
int _ttoi(TCHAR*): is the same as atoi, change a string into a int.
if ( _istdigit( strServiceName[0] ) ) { nPortNumber = (USHORT) _ttoi( strServiceName ); } |