Well I don't know much of C++, but I know enough to consummate that include is similar to import in Java. It is possible that ws2tcpip.h include winsock2.h. I know that .h's are header files but I don't know if you can use includes in them, so maybe it does so in the cpp file.
This is a complete guess, take it with a grain of salt. I suggest you research the subject.