L
L
logan baby2021-10-31 13:23:49
C++ / C#
logan baby, 2021-10-31 13:23:49

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

1 answer(s)
N
none7, 2021-10-31
@none7

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 question

Ask a Question

731 491 924 answers to any question