导航

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 49 下一页

2015年9月4日

摘要: 返回值优化(Return Value Optimization,简称RVO),是这么一种优化机制:当函数需要返回一个对象的时候,如果自己创建一个临时对象用户返回,那么这个临时对象会消耗一个构造函数(Constructor)的调用、一个复制构造函数的调用(Copy Constructo... 阅读全文

posted @ 2015-09-04 15:05 ggzone 阅读(510) 评论(0) 推荐(0) 编辑

摘要: 在全局变量前添加const或者static,则该变量链接性为内部,即文件内有效。可以使用extern声明为外部。如果要让函数的链接性为内部,则函数声明和定义都应使用static关键字。 例子:test.hextern int index;static voi... 阅读全文

posted @ 2015-09-04 11:14 ggzone 阅读(245) 评论(0) 推荐(0) 编辑

摘要: 在全局变量前添加const或者static,则该变量链接性为内部,即文件内有效。可以使用extern声明为外部。如果要让函数的链接性为内部,则函数声明和定义都应使用static关键字。 例子:test.hextern int index;static void fun();test.... 阅读全文

posted @ 2015-09-04 11:14 ggzone 阅读(222) 评论(0) 推荐(0) 编辑

摘要: 六个默认函数:构造函数(construct)析构函数(destruct)复制构造函数(copy construct)赋值(assign)移动构造函数(move construct)移动赋值(move)测试代码:#include using namespace std;int g_co... 阅读全文

posted @ 2015-09-04 10:39 ggzone 阅读(494) 评论(0) 推荐(0) 编辑

摘要: 六个默认函数:构造函数(construct)析构函数(destruct)复制构造函数(copy construct)赋值(assign)移动构造函数(move construct)移动赋值(move)测试代码:#include using namespace... 阅读全文

posted @ 2015-09-04 10:39 ggzone 阅读(191) 评论(0) 推荐(0) 编辑

2015年9月2日

摘要: 把include文件夹(里面是某个库的头文件)拷到自己的项目中,添加头文件时需要使用#include”include\xxx.h”方式,如果打算使用#include”xxx.h”方式。解决方法:项目属性->C++>常规->附加包含目录:$(ProjectDi... 阅读全文

posted @ 2015-09-02 20:21 ggzone 阅读(166) 评论(0) 推荐(0) 编辑

摘要: 把include文件夹(里面是某个库的头文件)拷到自己的项目中,添加头文件时需要使用#include”include\xxx.h”方式,如果打算使用#include”xxx.h”方式。解决方法:项目属性->C++>常规->附加包含目录:$(MSBuildProjectDirector... 阅读全文

posted @ 2015-09-02 20:20 ggzone 阅读(2551) 评论(0) 推荐(0) 编辑

2015年9月1日

摘要: 步骤:下载protobuf-2.6.1.zip和protoc-2.6.1-win32.zip,地址:https://github.com/google/protobuf/tags到目录protobuf-2.6.1\vsprojects下打开protobuf.... 阅读全文

posted @ 2015-09-01 18:49 ggzone 阅读(246) 评论(0) 推荐(0) 编辑

摘要: 步骤:下载protobuf-2.6.1.zip和protoc-2.6.1-win32.zip,地址:https://github.com/google/protobuf/tags到目录protobuf-2.6.1\vsprojects下打开protobuf.sln将项目libprot... 阅读全文

posted @ 2015-09-01 18:48 ggzone 阅读(1571) 评论(0) 推荐(0) 编辑

摘要: 步骤: 1. 安装MySQL数据库 2. 项目属性页->C/C++->常规->附加包含目录:xxx\MySQL Server 5.6\include 3. 项目属性页->链接器->常规->附加库目录:xxx\MySQL Server 5.6\lib ... 阅读全文

posted @ 2015-09-01 14:24 ggzone 阅读(131) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 49 下一页