会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
FredGrit
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
68
69
70
71
72
73
74
75
76
···
120
下一页
2023年3月19日
cpp get map last element
摘要: void util::print_map(const std::map<int,std::string> &mp) { std::cout << get_time_now() << ",std::this_thread::get_id()= " << std::this_thread::get_id
阅读全文
posted @ 2023-03-19 18:11 FredGrit
阅读(29)
评论(0)
推荐(0)
2023年3月18日
cpp generate template number and fill array then order by quick sort
摘要: //model/util.h template <typename T> T gen_random_num(T min, T max); void gen_uint64(const int &len); void gen_uint32(const int &len); template <typen
阅读全文
posted @ 2023-03-18 21:00 FredGrit
阅读(17)
评论(0)
推荐(0)
C++ mutex,lock,unlock,lockguard
摘要: //model/util.h #pragma once #include <algorithm> #include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include
阅读全文
posted @ 2023-03-18 20:09 FredGrit
阅读(22)
评论(0)
推荐(0)
2023年3月17日
C++ mutex lock,unlock
摘要: #model/util.h #pragma once #include <chrono> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include
阅读全文
posted @ 2023-03-17 22:54 FredGrit
阅读(33)
评论(0)
推荐(0)
c++ mutex operations try_lock,un_lock
摘要: //model/util.h #pragma once #include <chrono> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #includ
阅读全文
posted @ 2023-03-17 22:15 FredGrit
阅读(35)
评论(0)
推荐(0)
2023年3月15日
c++ pass function as argument
摘要: //util.cpp #include "model/util.h" void util::invoke_func_args(const util &ul, const int &len) { util ulcopy=ul; pass_func_args(ulcopy,len,&get_str_uu
阅读全文
posted @ 2023-03-15 09:13 FredGrit
阅读(25)
评论(0)
推荐(0)
2023年3月14日
cpp redifinition issues resolved by add macro #pragma once
摘要: 1.Without #pragma once 2.When complement #pragma once,compile worked
阅读全文
posted @ 2023-03-14 23:04 FredGrit
阅读(25)
评论(0)
推荐(0)
2023年2月26日
cpp std::sort array, the default sort order is ascending
摘要: //.model/util.h template<typename T> T get_random_num(T min,T max) { std::random_device rd; std::mt19937_64 mt(rd()); std::uniform_int_distribution<T>
阅读全文
posted @ 2023-02-26 15:02 FredGrit
阅读(34)
评论(0)
推荐(0)
cpp generate random number to fill array,order the array via quick sort
摘要: //model.util.h #include <iostream> #include <random> template<typename T> T get_random_num(T min,T max) { std::random_device rd; std::mt19937_64 mt(rd
阅读全文
posted @ 2023-02-26 14:49 FredGrit
阅读(22)
评论(0)
推荐(0)
2023年2月22日
cpp generate template random number
摘要: #include <iostream> #include <random> template<typename T> T gen_random(T min,T max) { std::random_device rd; std::mt19937_64 mt(rd()); std::uniform_i
阅读全文
posted @ 2023-02-22 11:03 FredGrit
阅读(20)
评论(0)
推荐(0)
上一页
1
···
68
69
70
71
72
73
74
75
76
···
120
下一页
公告