随笔分类 -  C++

C++
获取进程名,含路径
摘要:std::string program_path() { const int path_size = 512; char *path = (char *)malloc(path_size); if (path != NULL) { if (readlink("/proc/self/exe", pat 阅读全文

posted @ 2022-08-04 14:33 lialin 编辑

使用WaitForSingleObject阻塞唤醒线程
摘要:#include <cstdio> #include <string> #include "windows.h" #include <thread> HANDLE g_hEvent; void TestThread() { ResetEvent(g_hEvent); printf("ResetEve 阅读全文

posted @ 2020-10-09 15:25 lialin 编辑

给智能指针指向的对象赋值
摘要:使用.get()方法: std::tr1::shared_ptr<cv::Mat> pic_resize(new cv::Mat); *(pic_resize.get()) = (*dep_vs_pkt->image_)(cv::Rect(0, 0, dep_vs_pkt->image_->cols 阅读全文

posted @ 2020-03-09 19:49 lialin 阅读(1174) 评论(0) 推荐(0) 编辑

导航