随笔分类 -  C++ 从入门到入土

摘要:调用重载的信号 #ifndef MAINWIDGET_H #define MAINWIDGET_H #include <QWidget> #include <QPushButton> #include <QDebug> #include "subwidget.h" class MainWidget 阅读全文
posted @ 2023-08-01 13:07 巨兽~墨菲特 阅读(6) 评论(0) 推荐(0) 编辑
摘要:// 不用手动进行回收?: // 条件一: 在QT中建立了内存回收机制 从QBject派生的类, // 条件二: 指定父类,父类对象析构的时候,先析构子类对象 #include "mywidget.h" #include <QApplication> int main(int argc, char 阅读全文
posted @ 2023-07-29 11:04 巨兽~墨菲特 阅读(16) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/Alliswell-WP/p/CPlusPlus_MFC_01.html #pragma once #include <afxwin.h> class MyApp :public CWinApp { public: virtual BOOL InitI 阅读全文
posted @ 2022-09-16 13:51 巨兽~墨菲特 阅读(82) 评论(0) 推荐(0) 编辑
摘要:// 第一章认识C++对象1.2.6泛型算法应用于普通数组.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> /** * 要输出数组的内容,对数组进行升幂排序,反转数组的内容、复制数组的内容等操作 包含头文件 <algorithm 阅读全文
posted @ 2021-12-19 14:43 巨兽~墨菲特 阅读(35) 评论(0) 推荐(0) 编辑
摘要:指向常量的指针、常指针、指向常量的常指针 #include <iostream> using namespace std; int main() { // 指向常量的指针 //const int num = 78; //const int* point = # //cout << *point << 阅读全文
posted @ 2021-12-18 23:58 巨兽~墨菲特 阅读(67) 评论(0) 推荐(0) 编辑

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