![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
43967777
一枚程序猿
展开
-
OSG-CMAKE
编译好osg目录是没有cmake搜索文件的,如果想使用cmake osg。必须在环境变量中,设置OSG_DIR=D:/3d/OSG。才能使用find_package。原创 2023-04-24 10:48:53 · 129 阅读 · 0 评论 -
Msys2 Vcpkg使用
一个提交原创 2023-01-03 17:37:39 · 222 阅读 · 0 评论 -
C++ 多线程重点内容
1.C++的线程分类举例:假如你要烧水,然后去拉屎,准备杯子,烧水喂老婆喝水,老婆高兴了让你打lol(假设烧水20分钟。拉屎10分钟,杯子5分钟,老婆见不到你的忍耐时间为25分钟)同步阻塞(你只盯着水壶的火,烧开才走,再去拉屎,准备杯子,给老婆倒水)-老婆等了35分钟-生气 异步阻塞(水没有烧好,但是你先拉屎,拉完等水烧好,水烧好准备杯子)-老婆等了25分钟-勉强高兴 同步非阻塞(水没...原创 2020-04-17 18:52:35 · 201 阅读 · 0 评论 -
C++[常用数据转换]
1.精度转换/// double转换字符串inline std::string transString(double d,int len) { int first = round(d * pow(10, len)) / pow(10, len); int last = round(d * pow(10, len)) - (first * pow(10, len)); ...原创 2020-03-25 11:34:46 · 135 阅读 · 0 评论 -
C++正则表达式
1.通用正则功能 原始字符 正则(str需要转义) 结果 abc123def [0-9] 1,2,3 abc123def [0-9]+ 123 2018-Jan-18 [0-9]{4})-(([0-9]{1,2})|(Jan|Feb|Mar))-([0-9]{1,2} 2018-0...原创 2020-03-12 15:27:45 · 161 阅读 · 0 评论 -
STL高级语法
1.STL智能函数指针#include <functional>void test1(const std::string& s) { std::cout << "test1:" << s << '\n';}class ATestClass{public: void test2(const std::strin...原创 2020-03-12 11:04:40 · 255 阅读 · 0 评论 -
boost 高级功能
1.判断路径存在,如果不存在则创建if ( !boost::filesystem::exists(path)) { boost::filesystem::create_directories(path) ;}2.格式化参数_moveCmd = boost::format( "4,%1%,%2%,%3%,%4%,%5%,%6%," ) ;_moveCmd % axl...原创 2020-03-11 17:12:36 · 311 阅读 · 0 评论 -
Google Protobuff的一些问题
1.Google C++序列化和反序列化 // Serialization --------------------------------------------------- // Methods for serializing in protocol buffer format. Most of these // are just simple wrappers aroun...原创 2020-03-06 14:50:01 · 455 阅读 · 0 评论