上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 68 下一页
摘要: title: C语言个人学习笔记 date: 2020-03-22 14:32:18 宏 {% post_link C/'C语言判断宏参数是否为已定义的宏' %} 返回值 被({和})包起来的语句中,最后一个语句的值就是整个语句的值。可以用这个特性来构造有返回值的宏。例子: #include <st 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(44) 评论(0) 推荐(0)
摘要: title: C语言Makefile自动推导依赖关系 date: 2019-10-24 23:43:23 目录结构: # Works only when there is only one target # You may want to modify it run_debug: debug ./$ 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(55) 评论(0) 推荐(0)
摘要: title: CMake find_package兼容add_subdirectory date: 2023-08-25 17:15:50 tags: 如果依赖是通过add_subdirectory添加的,那么find_package的时候会报错找不到xxx-config.cmake。 实际上通过a 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(80) 评论(0) 推荐(0)
摘要: title: 把boost::bind的返回值插入到std::unordered_map中 date: 2020-05-03 12:56:26 tags: 只能以insert的形式插入,不能以[]的形式插入。原因不明。 不同的类里的成员函数不能插入同一个unordered_map中。 同一个类里的相 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(32) 评论(0) 推荐(0)
摘要: title: 右值引用 date: 2022-10-04 22:19:01 tags: 带名字的右值引用使用的时候会变成左值引用 result type must be constructible from input type #include <iostream> #include <vecto 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(65) 评论(0) 推荐(0)
摘要: title: websocketpp读取二进制 date: 2020-06-07 16:50:28 tags: 直接msg->get_payload().data()就好了。 std::string里可以装'\0',用data()就可以访问。 参考: https://github.com/zapho 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(54) 评论(0) 推荐(0)
摘要: title: std::shared_ptr转std::unique_ptr date: 2022-10-03 20:10:36 tags: 不能直接转,只能将其移动到另一个用std::unique_ptr管理的对象里。 #include <iostream> #include <memory> i 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(52) 评论(0) 推荐(0)
摘要: title: pb_ds学习笔记 date: 2020-03-30 22:39:47 文档:Policy-Based Data Structures 相关文章:pb_ds库实现支持多个相同的值的名次树 建议使用 using namespace __gnu_pbds; tree 参考:https:// 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(52) 评论(0) 推荐(0)
摘要: title: "error: use of deleted function ‘std::pair<const int, int>& std::pair<const int, int>::operator=(cons" date: 2021-02-22 14:23:25 error: use of 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(69) 评论(0) 推荐(0)
摘要: title: cppunit for linux入门笔记 date: 2020-05-25 12:20:48 tags: 我是用apt安装的 sudo apt install -y libcppunit-dev libcppunit-doc mkdir -p ~/doc ln -s /usr/sha 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(35) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 68 下一页