随笔分类 - C++
摘要:参考 c++之多线程中“锁”(mutex)的用法
阅读全文
摘要:参考 Eigen库矩阵运算使用方法 C++ MatrixXd::fullPivLu方法代码示例 c++ Eigen库中的矩阵分析为什么使用QR分解
阅读全文
摘要:参考 C++基础-map与unordered_map Linux下map hash_map和unordered_map效率比较
阅读全文
摘要:sscanf 和 sscanf_s 测试代码 #include <string> #include <stdio.h> #include <iostream> int main(int argc, char** argv){ //sscanf char str[512] = {0}; //取指定长度
阅读全文
摘要:设定线程可执行时间 #include <iostream> using namespace std; #include <boost/thread.hpp> boost::thread t_time; void wait(int seconds) { boost::this_thread::slee
阅读全文
摘要:博客参考:HappenLee 1. C++多线程编程的困扰 C++从11开始在标准库之中引入了线程库来进行多线程编程,在之前的版本需要依托操作系统本身提供的线程库来进行多线程的编程。(其实本身就是在标准库之上对底层的操作系统多线程API统一进行了封装,使用的pthread或<windows.h>来进
阅读全文
摘要:博客转自:https://www.cnblogs.com/liaocheng/p/4243731.html JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式,和xml类似,本文主要对VS2008中使用Jsoncpp解析json的方法做一下记录。 Jsonc
阅读全文
摘要:例子一 #include <iostream> #include <boost/thread.hpp> using namespace std; void func1(const int &id) { cout<<"func1 id : "<<id<<endl; } void func2(const
阅读全文
摘要:https://www.cnblogs.com/zhoug2020/p/10100376.html https://www.cnblogs.com/xiaojianliu/articles/8900795.html
阅读全文
摘要:c和c++语言混合编译时候,需要修改c语言头文件 #ifdef __cplusplus extern "C" { #endif /******/ #ifdef __cplusplus } #endif
阅读全文
摘要:博客参考: https://www.cnblogs.com/lidabo/p/3796554.html while(1)情况 void threadFunction() { while( true ) { std::cout << "todo something..." << std::endl;
阅读全文