2017年3月15日

摘要: //strtok()函数原型 /*_Check_return_ _CRT_INSECURE_DEPRECATE(strtok_s) _CRTIMP char * __cdecl strtok(_Inout_opt_z_ char * _Str, _In_z_ const char * _Delim) 阅读全文
posted @ 2017-03-15 15:48 czhoud 阅读(32758) 评论(0) 推荐(1) 编辑

2017年3月3日

摘要: //定义控件变量 CEdit sendData; //关联控件与变量。IDC_SendData为Edit Control类型的控件ID DDX_Control(pDX, IDC_SendData, sendData); CString sendBuf; //取得Edit Control类型的控件的输入内容,存储在sendBuf中 sendData.GetWindowText(sendBuf); ... 阅读全文
posted @ 2017-03-03 11:32 czhoud 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1 //定义变量,并关联控件与变量。IDC_RecvData为控件ID,recvData为控件对应的变量名 2 CListBox recvData; 3 4 DDX_Control(pDX, IDC_RecvData, recvData); 5 6 //向List Box控件IDC_RecvData 阅读全文
posted @ 2017-03-03 10:18 czhoud 阅读(157) 评论(0) 推荐(0) 编辑
摘要: //accept()函数原型 WINSOCK_API_LINKAGE _Must_inspect_result_ SOCKET WSAAPI accept( _In_ SOCKET s, //用来标识服务器端套接字(也就是listen函数中设置为监听状态的套接字) _Out_writes_bytes_opt_(*addrlen) st... 阅读全文
posted @ 2017-03-03 10:04 czhoud 阅读(183) 评论(0) 推荐(0) 编辑

2017年3月2日

摘要: //getaddrinfo()函数原型 WINSOCK_API_LINKAGE INT WSAAPI getaddrinfo( _In_opt_ PCSTR pNodeName, //节点名可以是主机名,也可以是数字地址。(IPV4的10进点分,或是IPV6的16进制) _In_opt_ PCSTR 阅读全文
posted @ 2017-03-02 10:37 czhoud 阅读(411) 评论(0) 推荐(0) 编辑
摘要: //转换示例: CString cstring= "hello,bro "; char* pcharbuf=new char; int iSize = WideCharToMultiByte(CP_ACP, 0, cstring, -1, NULL, 0, NULL, NULL); WideChar 阅读全文
posted @ 2017-03-02 10:34 czhoud 阅读(2781) 评论(0) 推荐(0) 编辑
摘要: 1. inet_ntop()、inet_pton() : 点分十进制字符串(dotted-decimal notation)与网络字节序(network byte order)二进制数值互转 //inet_ntop()函数原型 PCSTR WSAAPI inet_ntop( _In_ INT Fam 阅读全文
posted @ 2017-03-02 10:29 czhoud 阅读(4434) 评论(0) 推荐(0) 编辑

2016年11月3日

摘要: error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tre 阅读全文
posted @ 2016-11-03 14:10 czhoud 阅读(243) 评论(0) 推荐(0) 编辑

2016年9月19日

摘要: NMAKE:fatal error U1077.“cl.exe” return code 0xc0000135 产生原因:在安装visual studio的时候没有勾选注册环境变量导致的。 解决办法:在系统环境变量中加入visual studio的安装路径:vs安装路径\VC\Bin,以及vs安装路 阅读全文
posted @ 2016-09-19 09:52 czhoud 阅读(1839) 评论(0) 推荐(0) 编辑
摘要: String::String(const String &other) //拷贝构造函数 { cout << "自定义拷贝构造函数" << endl; int length = strlen(other.m_data); m_data = new char[length + 1]; strcpy(m 阅读全文
posted @ 2016-09-19 09:52 czhoud 阅读(210) 评论(0) 推荐(0) 编辑

导航