How would I convert an ip address into bytes in C++? Basically how do I parse the IP address? For example, if I have a string equal to 121.122.123.124.
I need to parse this such that byte1 = 121, byte2 = 122, byte3 = 123, byte4 = 124.
How would I convert an ip address into bytes in C++? Basically how do
Share
If the pattern is constant, number dot number dot etc, then use istringstream: