随笔分类 -  C/C++

摘要:获取cpu负载时 使用pdhaddenglishcounter 返回-1073738824 C000 0BB8 PDH_CSTATUS_NO_OBJECT auto state = PdhOpenQuery(NULL, NULL, &cpuQuery); if (state != ERROR_SUC 阅读全文
posted @ 2021-07-08 13:50 wolbo 阅读(622) 评论(0) 推荐(0) 编辑
摘要:设置崩溃处理函数 #if (defined _WIN32)||(defined _WIN64) #include <windows.h> #include <Dbghelp.h> #include <tchar.h> //#pragma execution_character_set( "utf-8 阅读全文
posted @ 2021-06-09 18:08 wolbo 阅读(276) 评论(0) 推荐(0) 编辑
摘要:Attributes in property tree are added as sub-nodes. property tree 属性作为子节点 (坑坑坑坑坑) 使用 write_xml_element(std::cout, pt.front().first, pt.front().second, 阅读全文
posted @ 2021-04-14 21:24 wolbo 阅读(69) 评论(0) 推荐(0) 编辑
摘要:在项目文件中增加 <PropertyGroup Label="Globals"> <!-- .... --> <VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet> <VcpkgTriple 阅读全文
posted @ 2021-02-24 15:39 wolbo 阅读(231) 评论(0) 推荐(0) 编辑
摘要:1 在项目目录下新建version.bat 粘贴以下内容 将svnurl 换成自己的仓库地址 @echo off for /f "delims=" %%i in ('date /t') do set d=%%i for /f "delims=" %%i in ('time /t') do set t 阅读全文
posted @ 2021-02-23 09:55 wolbo 阅读(254) 评论(0) 推荐(0) 编辑
摘要:程序启动了一会 送了一张图 dump是这样的 *** Aborted at 1612622285 (unix time) try "date -d @1612622285" if you are using GNU date *** @ 0x743dfd98 raise @ 0x743dc535 _ 阅读全文
posted @ 2021-02-06 23:07 wolbo 阅读(2409) 评论(0) 推荐(0) 编辑
摘要:1 下载喜欢的图标到工程目录 2 在相同目录新建文本文件 增加以下内容,并修改后缀为 logo.rc IDI_ICON1 ICON DISCARDABLE "car.ico"3 打开vcproj文件增加以下内容 <ItemGroup> <ResourceCompile Include="logo.r 阅读全文
posted @ 2021-01-21 17:39 wolbo 阅读(1261) 评论(0) 推荐(0) 编辑
摘要:grpc客户端断线重连使用backoff机制 重连间隔越来越长 可以通过参数指定相关参数 相关参数: https://grpc.github.io/grpc/core/group__grpc__arg__keys.html#gad7d9d143858d8f5e138cf704b0082973 相关代 阅读全文
posted @ 2021-01-18 16:23 wolbo 阅读(2739) 评论(0) 推荐(0) 编辑
摘要:简易的日期时间工具: #include <iostream> #include <sstream> #include <time.h> #include<chrono> #include<iomanip> #include<glog/logging.h> namespace DateTimeUtil 阅读全文
posted @ 2020-12-22 10:42 wolbo 阅读(317) 评论(0) 推荐(0) 编辑
摘要:1 time.h在ucrt(通用c运行库)里,同理syst/types.h也在这 2 查看vs include配置 3 打开visual studio installler 安装此版本sdk 阅读全文
posted @ 2020-12-19 15:57 wolbo 阅读(2895) 评论(0) 推荐(0) 编辑
摘要:1 cmake 集成vcpkg需要在cmakelist.txt中增加工具链(注意 需要在project前增加) SET(CMAKE_TOOLCHAIN_FILE "D:/vcpkg/scripts/buildsystems/vcpkg.cmake") 2 找不到boost目录,原因是find_pac 阅读全文
posted @ 2020-12-13 16:37 wolbo 阅读(2989) 评论(0) 推荐(1) 编辑
摘要:指针成员: 好处: 1 类占内存较小 2 可以不包含头文件,使用前置声明 3 可以不指定具体实现,使用父类指针 坏处: 手动管理内存,需要指定拷贝构造,赋值构造,析构函数 非指针成员: 好处: 1 不需要管内存 坏处 1 不能使用前置声明 2 类实例占内存大 3 只能明确实现 4 需要在构造方法里调 阅读全文
posted @ 2020-12-07 20:17 wolbo 阅读(339) 评论(0) 推荐(0) 编辑
摘要:void AddTwoBigNumbers(char bigN[], char bigM[], char sum[]) { int i=strlen(bigM)-1, j=strlen(bigN)-1, k, carry=0; for(k=0; i>=0 && j>=0; --i, --j, ++k 阅读全文
posted @ 2020-07-06 08:38 wolbo 阅读(445) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示