
C++ primer
杜xx
这个作者很懒,什么都没留下…
展开
-
C++ 显式转换
命名的强制类型转换:: static_cast 任何具有明确定义的类型转换,只要不包含底层const,都可以使用 const char * cpconst_cast只能改变运算对象的底层constreinterpret_cast通常为运算对象的位模式提供较低层次上的重新解释。例如 int * 强制转换为char* 指向的还是in转载 2015-12-25 18:06:49 · 266 阅读 · 0 评论 -
STL容器数据结构
vector:单向线性连续空间list:环形的双向链表deque:双向开口的连续性空间,先进先出stack:先进后出的数据结构,只有一个开口转载 2017-04-08 17:43:17 · 283 阅读 · 0 评论 -
C++ 网站 VS下载网站
http://zh.cppreference.com/w/%E9%A6%96%E9%A1%B5转载 2016-10-31 11:19:22 · 377 阅读 · 0 评论 -
C++ 官网的例子,可变参数的函数
#include void tprintf(const char* format) // base function{ std::cout format;} templatetypename T, typename... Targs>void tprintf(const char* format, T value, Targs... Fargs) // recursive转载 2016-10-31 11:42:49 · 274 阅读 · 0 评论 -
windows 下C++对象池实现,支持并发
#pragma once//#include "FSNIAlgo.h"#include "Windows.h"#include #define MINALGOSIZE 1templateclass FSNIObjPool{public: FSNIObjPool(void); ~FSNIObjPool(void); void AlloAlgoPool(); T*原创 2016-10-21 17:00:48 · 1077 阅读 · 0 评论 -
C++ 函数模板和模板类
#include #include using namespace std;//函数模板templatetypename T>bool equivalent(const T&a, const T&b){ return !(a !(b}//类模板templatetypename T=int>//默认参数class Bignumber{转载 2016-09-13 09:55:34 · 287 阅读 · 0 评论 -
C++ 类自动生成函数
每个类只有一个析构函数和一个赋值函数,但可以有多个构造函数(包含一个拷贝构造函数,其它的称为普通构造函数)。对于任意一个类A,如果不想编写上述函数,C++编译器将自动为A 产生四个缺省的函数,如A(void); // 缺省的无参数构造函数A(const A &a); // 缺省的拷贝构造函数~A(void); // 缺省的析构函数A & operate =(转载 2016-06-08 14:44:54 · 2457 阅读 · 0 评论 -
C/C++程序员必须熟练应用的开源项目
作为一个经验丰富的C/C++程序员, 肯定亲手写过各种功能的代码, 比如封装过数据库访问的类, 封装过网络通信的类,封装过日志操作的类, 封装过文件访问的类, 封装过UI界面库等, 也在实际的项目中应用过, 但是回过头仔细想想,其实以前自己写过的这些代码,只能是在特定的项目或者特定的环境中使用, 对于自己来说, 在不同的项目中应用, 只需要复制代码, 改改也就可以了, 因为自己写的代码自己很熟转载 2016-06-02 14:19:54 · 330 阅读 · 0 评论 -
C++在类内定义模板函数
必须在头文件和CPP文件内声明class Tpublic: template string StructToString(const T &tStruct);templatestring CClient::StructToString(const T &tStruct){ rapidxml::xml_doc原创 2016-03-03 11:02:19 · 1556 阅读 · 0 评论 -
学习qt 网站
http://www.cppblog.com/biao/category/9973.html阿洲的网站 有C++ QT OPENCVhttp://monkeycoding.com/?page_id=5 http://www.qtdebug.com https://lug.ustc.edu.cn/sites/qtguide/ http://blog.csdn...转载 2016-09-18 10:19:03 · 383 阅读 · 0 评论