#include <iostream>
#include <cstdint>
#include <strstream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int main()
{
    const std::string prefix = "192.168.52." ;

    // loop through ips 192.168.52.0 to 192.168.52.15
    for( int i = 0 ; i < 16 ; ++i )
    {
         char buffer[1024] ;
         {
             std::ostrstream stm( buffer, sizeof(buffer) ) ;
             stm << prefix << i << std::ends ;
         }

         in_addr_t addr = inet_addr(buffer) ;
         std::cout << addr << '\n' ;
    }
}
