Dec 1, 2020 #1 fitzbertp Technical User Dec 1, 2020 1 US I need a C++ program that can read a line of string and verify if it is a IP address or not and give reasons why it is not.
I need a C++ program that can read a line of string and verify if it is a IP address or not and give reasons why it is not.
Dec 2, 2020 #2 xwb Programmer Jul 11, 2002 6,828 GB Try using regular expressions https://www.softwaretestinghelp.com/regex-in-cpp/ The syntax of IPV4 and IPV6 is quite different so you'll have to work out which one it is first then apply the correct regular expression.
Try using regular expressions https://www.softwaretestinghelp.com/regex-in-cpp/ The syntax of IPV4 and IPV6 is quite different so you'll have to work out which one it is first then apply the correct regular expression.