该文被密码保护。 阅读全文
posted @ 2016-03-06 07:52 Msnow 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-03-01 05:34 Msnow 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1.只有声明,没有定义 4.cpp文件没有加入工程里面(使用源代码的情况) 3.缺少链接库 工程右键---属性----配置属性 -> 链接器 -> 输入 -> 附加依赖项 -> 点击... 添加依赖项 name.lib 参考目录:http://blog.csdn.net/lanyang123456/ 阅读全文
posted @ 2016-02-29 11:32 Msnow 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 参考: VS2013使用winsock.h和winsock2.h发生冲突后的终极解决方法:http://www.cnblogs.com/Shirlies/p/5137548.html WINSOCK.H WINSOCK2.H的区别及函数重复定义的解决方法:http://blog.chinaunix. 阅读全文
posted @ 2016-02-27 20:26 Msnow 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 例如:_mapTransportInfos.insert(std::make_pair<uint32, CTransportInfoPtr>(iter_t->m_nID, pinfo));这句代码在vs2012的c++11就无法编译,报2664错误。可以用如下强制转换来实现: 第一种方法(我这没成功 阅读全文
posted @ 2016-02-27 12:59 Msnow 阅读(847) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.cnblogs.com/dongsheng/p/4011145.html 阅读全文
posted @ 2016-02-26 17:56 Msnow 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 1.Ctrl+F5 2.结尾添加 getchar() 3.结尾添加 system("pause"); 参考:http://jingyan.baidu.com/article/5552ef473b08f3518ffbc931.html 阅读全文
posted @ 2016-02-26 17:34 Msnow 阅读(1133) 评论(0) 推荐(0) 编辑
摘要: 1.你建立的工程使用了预编译功能, cpp最前边要留一行这样的内容: #include "StdAfx.h" 2.在VS的solution explorer中右键checklist.pb.cc-->属性-->预编译头(precompiled header)->预编译头(precompiled hea 阅读全文
posted @ 2016-02-26 17:25 Msnow 阅读(5070) 评论(0) 推荐(0) 编辑
摘要: 1.定义对象之前,编译器必须看到完整的类定义,你的代码std::fstream out("person.pb", ios::out | ios::binary | ios::trunc); 中的std::fstream只是声明了,还没有定义,需要包含头文件。 阅读全文
posted @ 2016-02-26 17:15 Msnow 阅读(5885) 评论(0) 推荐(0) 编辑
摘要: 参考: C++文件读写详解(ofstream,ifstream,fstream):http://blog.csdn.net/kingstar158/article/details/6859379 fstream的使用方法介绍:http://www.cppblog.com/saga/archive/2 阅读全文
posted @ 2016-02-26 17:11 Msnow 阅读(149) 评论(0) 推荐(1) 编辑