C/C++
坂田民工
通信电子老登
展开
-
C++ pthread封装
#ifndef __HI_MW_THREAD_H__#define __HI_MW_THREAD_H__#include <pthread.h>#include <unistd.h>#include "hi_type.h"/* * HiMWThread Event callback. Used for listen running state. */class HiMWThread;class IHiMWThreadEvt{public: virtu原创 2021-03-27 14:36:35 · 366 阅读 · 0 评论 -
配置vscode的C++运行环境
zhuhongxi2021-3-211. Linux ubuntu下载vscode下载 C/C++ 插件创建工程文件夹并用vscode打开这个文件夹运行选项中,选择添加配置(Add configuration),然后选择C++(GDB/LLDB),将自动生成launch.json文件(也可以在工程文件夹下的 .vscoed 目录下手动创建launch.json文件,并复制一下内容){ // 使用 IntelliSense 了解相关属性。 // 悬停以查.原创 2021-03-21 20:48:04 · 420 阅读 · 0 评论 -
C++ const和指针笔记
C++ const和指针笔记2021-3-12zhuhongxi 1. const int p; 2. const int* p; 3. int const* p; 4. int * const p; 5. const int * const p; 6. int const * const p; 7. 第一种是常量整数,没什么好说的。后面五种是指针,有一个简便的办法记忆。 从右往左读,遇到p就替换成“p is a ”遇到*就替换成“point to”。 比如说2,读原创 2021-03-12 11:13:17 · 79 阅读 · 0 评论