会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
30
31
32
33
34
35
36
37
38
···
133
下一页
2022年3月9日
什么时候需要加锁
摘要: 1、设计单个对象的时候,不用加锁 因为我在设计一个类对象的时候,并不知道其他人会怎么使用这个对象,可能会单线程使用,也可能多线程,如果我们不分青红皂白就直接加锁,那可能性能直接下降许多 2、对多个对象进行管理的时候,需要加锁 如果我们使用容器对多个数据进行管理的时候,最好加锁 3、对基本数据不用加锁
阅读全文
posted @ 2022-03-09 11:20 朱小勇
阅读(604)
评论(0)
推荐(0)
2022年3月6日
Qt使用三方库
摘要: 1、dll文件 LIBS +=-L$$PWD -lmydll 2、a文件 LIBS +=-L$$PWD -lmylib LIBS +=$$PWD/mylib.a
阅读全文
posted @ 2022-03-06 23:42 朱小勇
阅读(122)
评论(0)
推荐(0)
C++11关键字decltype
摘要: 1、作用 选择并返回操作数的数据类型 2、使用 int A(); int main(void) { int tempA = 2; /*1.testA为int*/ decltype(tempA) testA; /*2.testB为int,并不调用A()*/ decltype(getSize()) te
阅读全文
posted @ 2022-03-06 22:54 朱小勇
阅读(49)
评论(0)
推荐(0)
C++线程池
摘要: https://www.cnblogs.com/lzpong/p/6397997.html
阅读全文
posted @ 2022-03-06 22:52 朱小勇
阅读(79)
评论(0)
推荐(0)
Boost使用线程池
摘要: 1、首先需要编译安装boost【QT】 https://www.cnblogs.com/judes/p/11027830.html 2、下载线程池源码 http://threadpool.sourceforge.net/ 3、解压 4、将上面框出的文件复制到Qt目录 5、配置pro DEPENDPA
阅读全文
posted @ 2022-03-06 21:32 朱小勇
阅读(1030)
评论(0)
推荐(0)
2022年3月3日
Qt:Using QByteRef with an index pointing outside the valid range of a QByteArray
摘要: 解决: QString a;//QByteArray a.resize(10);
阅读全文
posted @ 2022-03-03 11:50 朱小勇
阅读(1643)
评论(0)
推荐(0)
模板类静态成员初始化
摘要: 1、代码 template<class T> class A{ private: int max; } template<class T> int A<T>::max=0;
阅读全文
posted @ 2022-03-03 11:01 朱小勇
阅读(167)
评论(0)
推荐(0)
2022年3月2日
关于std容器存储指针和智能指针
摘要: 1、容器类型 如std::vector、std::quenu 2、存储普通指针 容器去除某项时,只会将指针去除,堆上的对象依旧存储,故需要手动回收 //std::queue while (MyTestQueue.size() != 0) { Example* pExample = MyTestQue
阅读全文
posted @ 2022-03-02 15:21 朱小勇
阅读(302)
评论(0)
推荐(0)
2022年2月28日
std::dequen
摘要: https://blog.csdn.net/fengbingchun/article/details/72757856/
阅读全文
posted @ 2022-02-28 16:32 朱小勇
阅读(21)
评论(0)
推荐(0)
std::stack
摘要: https://blog.csdn.net/datase/article/details/82593069
阅读全文
posted @ 2022-02-28 16:32 朱小勇
阅读(53)
评论(0)
推荐(0)
上一页
1
···
30
31
32
33
34
35
36
37
38
···
133
下一页
公告