随笔分类 -  C++

局部变量问题
摘要:未赋初值的局部比阿娘会导致难以debug的问题,而这些通常都是编译器造成的。 阅读全文

posted @ 2021-12-30 17:29 xiegangqingnian 阅读(35) 评论(0) 推荐(0)

写完代码如何测试内存泄露问题
摘要:对自己的code,在上传之前,使用valgrind来清除mem leak问题 阅读全文

posted @ 2021-12-30 17:27 xiegangqingnian 阅读(34) 评论(0) 推荐(0)

数据压缩算法中的优化问题
摘要:在对1.3G大小的vcd文件进行压缩时,没有优化过的运行时间是14个小时,利用gpertools工具对算法进行性能瓶颈分析之后,最主要的优化地方是将string类型的字符串拼接方式由+改为+=,目前运行时间为220s. 其次优化了读取vcd文件的方式,使其能够从特定的位置开始读取,不存在读到无效数据 阅读全文

posted @ 2021-11-25 09:38 xiegangqingnian 阅读(95) 评论(0) 推荐(0)

c++11序列化库cereal第二篇
摘要:https://renyili.org/post/cereal%E5%BA%8F%E5%88%97%E5%8C%96%E5%BA%93%E4%BD%BF%E7%94%A8%E6%80%BB%E7%BB%93/ 阅读全文

posted @ 2021-01-14 10:04 xiegangqingnian 阅读(150) 评论(0) 推荐(0)

C++11的function和bind
摘要:https://blog.csdn.net/qq_36327203/article/details/108697677 阅读全文

posted @ 2021-01-12 18:00 xiegangqingnian 阅读(54) 评论(0) 推荐(0)

C++11 序列化库 cereal
摘要:https://blog.csdn.net/weixin_38169562/article/details/99774871 阅读全文

posted @ 2021-01-12 14:54 xiegangqingnian 阅读(109) 评论(0) 推荐(0)

std::ostringstream输出流详解
摘要:https://www.cnblogs.com/beeasy/p/6063924.html 阅读全文

posted @ 2021-01-12 13:53 xiegangqingnian 阅读(261) 评论(0) 推荐(0)

pthread使用barrier栅栏方式同步
摘要:https://langzi989.github.io/2018/07/05/pthread%E4%BD%BF%E7%94%A8barrier%E6%A0%85%E6%A0%8F%E6%96%B9%E5%BC%8F%E5%90%8C%E6%AD%A5/ 阅读全文

posted @ 2020-12-30 10:07 xiegangqingnian 阅读(101) 评论(0) 推荐(0)

用gdb调试程序命令
摘要:原文:https://wiki.ubuntu.org.cn/%E7%94%A8GDB%E8%B0%83%E8%AF%95%E7%A8%8B%E5%BA%8F 阅读全文

posted @ 2020-12-10 15:07 xiegangqingnian 阅读(85) 评论(0) 推荐(0)

queue的使用
摘要:原文:http://c.biancheng.net/view/479.html 阅读全文

posted @ 2020-12-10 10:09 xiegangqingnian 阅读(133) 评论(1) 推荐(0)

make_shared的使用
摘要:make_shared的使用: shared_ptr<string> p1 = make_shared<string>(10, '9'); shared_ptr<string> p2 = make_shared<string>("hello"); shared_ptr<string> p3 = ma 阅读全文

posted @ 2020-12-03 09:09 xiegangqingnian 阅读(13418) 评论(0) 推荐(0)

泛函算法
摘要:1.find()用于搜索无序集合中是否存在某值。搜索范围由iterator[first,last]指出。如果找到目标,find()会返回一个iterator指向该值,否则返回一个iterator指向last。 2.count()返回数值相符的元素数目。 3.Iterator(泛型指针),可提供有如内 阅读全文

posted @ 2020-01-10 10:11 xiegangqingnian 阅读(262) 评论(0) 推荐(0)

essential C++ 3.1题
摘要:#include<iostream>#include<fstream>#include<vector>#include<algorithm>#include<map>#include<set> using namespace std; ////0.declare function void Init 阅读全文

posted @ 2020-01-09 11:03 xiegangqingnian 阅读(157) 评论(0) 推荐(0)

导航