Is it so that google does not work wherever you are?
Oh, and by the way from the masscan github page:
"Scanning the entire Internet is bad. For one thing, parts of the Internet react badly to being scanned. For another thing, some sites track scans and add you to a ban list, which will get you firewalled from useful parts of the Internet."
Why do you want to do this nonsense?
Memory in C++ is a leaky abstraction .