- 博客(16)
- 资源 (1)
- 收藏
- 关注
转载 单链表反转
http://c.biancheng.net/view/8105.html
2021-03-15 15:43:49
329
转载 内存对齐
https://www.cnblogs.com/damaohai/p/11606950.html
2021-01-13 16:45:57
114
原创 大小端测试代码与类型转换
#include <stdio.h> int main() { int i_Int4 = 1; char c_First = *(char*)(&i_Int4);//类型转换 if (c_First == 1) printf("第一个字节为1,小端存储\n"); else printf("第一个字节为0,大端存储\n"); return 0; } /*********测试代码2***********/ #include <stdio.h> union.
2020-09-28 09:28:33
182
转载 通俗易懂的单例模式讲解(懒汉、饿汉)
1.懒汉: 顾名思义,不到万不得已就不会去实例化类,也就是说在第一次用到类实例的时候才会去实例化。懒汉本身是线程不安全的 在访问量较小时,采用懒汉实现。这是以时间换空间。 2.饿汉: 饿了肯定要饥不择食。所以在单例类定义的时候就进行实例化。本身就是线程安全的 由于要进行线程同步,所以在访问量比较大,或者可能访问的线程比较多时,采用饿汉实现,可以实现更好的性能。这是以空间换时间。 ...
2020-09-16 12:14:24
426
转载 双目相机标定
https://www.cnblogs.com/zyly/p/9366080.html
2020-08-27 14:15:53
171
原创 读写txt文本
/*************************** *******读取第一列数据******** ***************************/ void ReadTxt() { char buffer[256]; ifstream inFile("FilePath\\1.txt",ios::in); if(!inFile.is_open()) { return; } vector<string> all.
2020-08-10 14:00:55
173
原创 MFC载入背景图像
在Dlg.cpp中的Opaint()函数中的else后添加如下代码: { CPaintDC dc(this); CRect rect; GetClientRect(&rect); CDC dcMem; dcMem.CreateCompatibleDC(&dc); CString strPath = _T(".\\res\\background.png"); CImage backImg; backImg.Load(strP
2020-06-05 10:32:26
289
转载 Qt添加背景图片的方法
//1.QPalette //存在问题:图片可以显示出来,但是图片大小不能和frame大小一致,显示效果不好 #include <QApplication> #include <QtGui> #include <QFrame> int main(int argc, char *argv[]) { QApplication app(argc,argv)...
2020-01-07 09:51:14
268
转载 如何获取窗口句柄
1、使用FindWindow函数获取窗口句柄 2、获取所有顶层窗口以及它们的子窗口 使用EnumWindows和EnumChildWindows函数以及相对的回调函数EnumWindowsProc和EnumChildWindowsProc获取所有顶层窗口以及它们的子窗口 3、使用GetDesktopWindow和GetNextWindow函数得到所有的子窗口 ...
2019-11-12 10:52:00
2347
原创 如何打开、隐藏和关闭外部exe
1.打开exe #include <windows.h> #include <tchar.h> void ExecuteExe() { SHELLEXECUTEINFO ShExecInfo = { 0 }; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_N...
2019-11-08 11:20:53
1689
转载 _beginthreadex创建多线程的用法
一、实例 #include <stdio.h> #include <string> // for STL string class #include <windows.h> // for HANDLE #include <process.h> // for _beginthread()...
2019-11-01 14:49:00
851
转载 c++删除指定文件夹下的所有文件
方法1.c++删除指定文件夹下的所有文件 void DeleteDirectory(CString strPath) { CFileFind tempFind; TCHAR sTempFileFind[MAX_PATH] = { 0 }; wsprintf(sTempFileFind, _T("%s\\*.*"), strPath); BOOL IsFinded...
2019-09-21 15:41:09
6774
1
转载 windows下使用CMake手动配置opencv3.4.1 win32版本
https://blog.csdn.net/ezhchai/article/details/80557936
2019-09-10 16:10:03
425
原创 MFC如何创建一个新的全屏子界面
首先,在建好的MFC工程中资源视图中的Dialog插入一个新的ChildrenDialog; 打开ChildrenDialog界面,添加CChildrenDilaog类; 在MainDialog.cpp中的OnInitDialog函数中添加如下代码: // TODO: 在此添加额外的初始化代码 if (m_pDlg == NULL) //CChildrenDialog *m_...
2019-08-31 22:38:37
573
转载 转载:MFC绘制实心圆(亲测有效)
void CMyPaintView::MDrawRedArc(CPoint point, int mSize) { CPoint tmppoint; tmppoint.x=point.x-mSize; tmppoint.y=point.y-m_Size; CPen pNewPen; CPen *pOldPen; pNewPen.CreatePen(PS_SOLID,1,RGB(255...
2019-08-29 10:19:24
2986
转载 转载:如何获取指定文件夹下文档名称(C++)
版权声明:本文为CSDN博主「vict_wang」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/vict_wang/article/details/84033585 #include <iostream> #include <io.h> #include <xstring&...
2019-08-21 10:16:06
200
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人