自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 问答 (1)
  • 收藏
  • 关注

原创 C++ Read a whole File using ifstream

 std::ifstream ifs("filename.txt"); std::string str((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); Mind the extra parenthesis in the str declaration, it's necessary for correct p

2015-08-17 20:16:55 480

原创 代码格式工具

1) astyle 安装方法 apt-get install astyle 2) indent apt-get install indent

2015-08-17 17:52:57 350

原创 Windows 上使用cmake

1. 安装一款C/C++编译器     例如 VS系列, Mingw系列, Dev-C++系列 2. 安装CMake 3. 安装make 4. 设置好他们的环境变量 5. 编写测试文件 hello.cpp #include int main() { int d; printf("hello world."); scanf("%d", &d); getchar(); re

2015-08-14 11:59:31 286

原创 APR 内存池

#include #include int main() { apr_pool_t *pool; apr_status rv; char *buf; rv = apr_initialize(); if (rv != APR_SUCCESS) { return -1; } rv = apr_pool_create(&po

2015-08-13 20:27:50 316

原创 Service 写法

写了一个简单的service

2015-08-11 19:13:57 581

原创 用boost::shared_ptr 进行数据管理

我们经常遇到这样的情况, 类A和类B同时需要使用类C这个数据。那么类C这个数据由谁来存储呢? 比如:有个Student A, Class C(班级), Student Union SU(学生会), 这个学生A既可能是班级C的一员,也可能是学生会SU的一员。 下面是一个demo。 #include #include #include #include class Student { p

2015-08-10 18:04:03 371

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除