![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习C++
文章平均质量分 56
liuwinner
为学者日益,为道者日损!
展开
-
C以及C++在const的区别,以及const在C++的增强
C语言中const是一个伪常量,可以通过指针间接赋值改变,在C++中const得到加强,定义的是真常量。const int a = 3;const int b = 4;int array[a + b] = { 0 };以上语句在C语言报错,在C++中通过,即可说明真伪常量的区别。定义:const type name=value;注意:初始化和定义一起C语言通过指针改变const值:...原创 2018-07-19 20:34:18 · 990 阅读 · 2 评论 -
出现CString,BYTE,DWORD等未定义的标志符的错误
在不使用MFC时,使用以上类型需要#include"atlstr.h" 或者 #include <afx.h>使用MFC包含cstringt.h。转载 2018-09-04 20:14:48 · 13987 阅读 · 2 评论 -
Qt4.8使用第三方串口类QExtSerialPort(雷达)
相对于使用QT5的QSerialPort串口类需要各种麻烦,还是选中了QExtSerialPort.qextserialport下载:http://sourceforge.net/projects/qextserialport/需要使用到的文件:windows平台下:qextserialbase.cpp,extserialbase.h,win_qextserialport.cpp,wi...原创 2019-04-01 17:02:08 · 2056 阅读 · 0 评论 -
CF-test动态库函数
// AccessingArrays.cpp : Defines the initialization routines for the DLL.//#include "stdafx.h"#include <mbstring.h> #include "math.h"#include "tsapivc.h"using namespace TS;#i...原创 2019-03-28 10:13:46 · 786 阅读 · 0 评论 -
解决VS平台迁移时报错error MSB8020:The build tools for v141
将在VS2017上编译的程序放到VS2013中,报错:error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools.这是由于平台工具集不符合导致的...原创 2019-04-11 09:31:56 · 8571 阅读 · 1 评论 -
获取exe或DLL地址的方法
目录代码代码在Unicode字符集下,以下代码可用HMODULE GetSelfModuleHandle(){ MEMORY_BASIC_INFORMATION mbi; return ((::VirtualQuery(GetSelfModuleHandle, &mbi, sizeof(mbi)) != 0) ? (HMODULE)mbi.AllocationBas...原创 2019-06-21 09:30:58 · 1044 阅读 · 0 评论