I am using Visual Studio 2015 and trying to compile code that worked before I upgraded from VS 2013.
'inet_addr': use inet_pton () or InetPton () or define _WINSOCK_DEPRECATED_NO_WARNINGS
partner.sin_addr.s_addr = inet_addr(ip.c_str());
I tried to use the mentioned functions, but they were undefined. I tried to define a macro in many different places, but nothing happened. Another thread said that I should include Ws2tcpip.h instead of WinSock2 and add Ws2_32.lib. I already have a library, and when I used include, nothing happened. What's happening?!
c ++ winsock
The count
source share