如下代码所示:
bool APN::isIPVaild(const std::string& str) { struct in_addr addr; if (inet_aton(str.c_str(), &addr) == 0) return false; return true; }通过inet_aton函数,来进行判断,合规就返回TRUE,否则返回FALSE
如下代码所示:
bool APN::isIPVaild(const std::string& str) { struct in_addr addr; if (inet_aton(str.c_str(), &addr) == 0) return false; return true; }通过inet_aton函数,来进行判断,合规就返回TRUE,否则返回FALSE