摘要: //< >引用的是编译器的类库路径里面的头文件//" "引用的是你程序目录的相对路径中的头文件#include <stdio.h>#include <stdlib.h>#include <winsock2.h>#include <string.h> //添加默认链接库#pragma comment( 阅读全文
posted @ 2017-09-22 23:29 苍月代表我 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 使用VS2010新建2个项目,一个叫 “tcpserver” ,另一个叫 “tcpclient”。 右击 "项目" --> "属性" --> "配置属性" --> "链接器" --> "输入" --> "附加依赖项" ,在右侧下拉框中点击 “编辑” 按钮,添加 “WS2_32.lib”,单击确定。 阅读全文
posted @ 2017-09-22 23:26 苍月代表我 阅读(4854) 评论(0) 推荐(0) 编辑
摘要: 首先是TCP server端: [cpp] view plain copy #include "stdafx.h" #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") int main(int argc 阅读全文
posted @ 2017-09-22 23:25 苍月代表我 阅读(4652) 评论(0) 推荐(0) 编辑
摘要: ini文件 .ini 文件是Initialization File的缩写,即初始化文件。是windows的系统配置文件所采用的存储格式,统管windows的各项配置,一般用户就用windows提供的各项图形化管理界面就可实现相同的配置了,但在某些情况,还是要直接编辑.ini才方便,一般只有很熟悉wi 阅读全文
posted @ 2017-09-22 23:23 苍月代表我 阅读(514) 评论(0) 推荐(0) 编辑