The most serious problem is on the invalid_socket, why does this happen? Usually there is no permission, we do not run this thing with administrator privileges, of course, we can return to re-enter or log on to the computer will always use the administrator identity. Of course we can also change this place:
This way if you do not run vs with the Administrator, you will be prompted to change, click on the confirmation, a lot of convenience.
Of course, the problem is the following: VS2013 socket new function instead of the old function caused by the compilation error, the detailed solution refers to this experience:
Http://jingyan.baidu.com/article/1709ad8097e5904634c4f03e.html
In simple terms:
Project Properties, Configuration Properties, C + +, general, SDL checks
There are some functions used when there will be a warning, if you worry about the problem with the change, after all, the previous code will not take into account the various complex problems encountered later, the change is very normal.
Learn Winsock There is a more violent approach, that is to install virtual machines, XP system, and then in the inside of a vc++6.0 build project, find books, slowly learn. At the end of the article, thank Shuo elder brother, the long support!
A few small problems in calling Winsock under the VS2013 environment