两台电脑简单通信
代码说明:
很简单的源码,通过C++实现两台电脑的简单通信,希望对大家有帮助,#include #include #pragma comment(lib,"ws2_32.lib") void main() { WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested = MAKEWORD( 1, 1 );//请求1.1版本的winsock库 err = WSAStartup( wVersionRequested, &wsaData ); if ( err != 0 ) { return; } if ( LOBYTE( wsaData.wVersion ) != 1 || HIBYTE( wsaData.wVersion ) != 1 ) { WSACleanup( ); return; } &n
下载说明:请别用迅雷下载,失败请重下,重下不扣分!