文章分类 - C/C++
摘要:转自:https://blog.csdn.net/yhc166188/article/details/85863051 core dump的概念: A core dump is the recorded state of the working memory of a computer progra
阅读全文
摘要:c_str()和data():生成一个const char*指针,指向一个临时数组。 有解释说c_str必然带‘\0’,至于data要不要带’\0’,这个标准没说。 1 2 3 4 5 6 7 8 9 10 11 关于c_str()返回的字符串指针指向的数组 引用这里 的解释:这个数组的数据是临时的
阅读全文
摘要:转自:http://www.cnblogs.com/abc-begin/p/7895817.html gflags是google开源的一个解析命令行参数的工具。 最简单的demo 直接运行结果如下: [amcool@leoox build]$ ./demo confPath = ../conf/se
阅读全文
摘要:转自:http://blog.csdn.net/u012372584/article/details/78901015 JSON全称为JavaScript ObjectNotation,它是一种轻量级的数据交换格式,易于阅读、编写、解析。jsoncpp是c++解析JSON串常用的解析库之一。 jso
阅读全文
摘要:转自:http://www.cnblogs.com/jiayayao/archive/2016/12/03/6128877.html 为了解决C++内存泄漏的问题,C++11引入了智能指针(Smart Pointer)。 智能指针的原理是,接受一个申请好的内存地址,构造一个保存在栈上的智能指针对象,
阅读全文
摘要:unction template <numeric> std::accumulate sum (1) template <class InputIterator, class T> T accumulate (InputIterator first, InputIterator last, T in
阅读全文
摘要:转载自:http://www.cnblogs.com/pop-lar/p/5123014.html thread_local变量是C++ 11新引入的一种存储类型。它会影响变量的存储周期(Storage duration),C++中有4种存储周期: automatic static dynamic
阅读全文
摘要:在网上查了一些资料,了解了write函数。 write(constant char*content,int size)参数的解释: content是 char类型的一个指针 size指的是这个content内容的大小 转载自:http://www.cnblogs.com/nt05/archive/2
阅读全文
摘要:转自:http://www.cnblogs.com/kex1n/archive/2011/01/28/2286423.html 对输入流操作:seekg()与tellg()对输出流操作:seekp()与tellp()下面以输入流函数为例介绍用法:seekg()是对输入文件定位,它有两个参数:第一个参
阅读全文

浙公网安备 33010602011771号