Answer the question
In order to leave comments, you need to log in
Is there an Ipv4 validation function in C++?
if not, then tell me how to implement it in a minimum of lines. just a very huge code comes out
Answer the question
In order to leave comments, you need to log in
What's the point of validating it? Here your program will accept only 4 decimal numbers from 0 to 255 separated by a dot, while most of the software normally digests octal with hexadecimal numbers. And even 0x7f000001 is recognized as a normal address. All these programs use the inet_aton function implemented in each OS. But this is pure C, not C++.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question