Articles
140
Tags
0
Categories
18
首页
归档
标签
分类
友链
李瑞琦的博客
05 继承及多态
首页
归档
标签
分类
友链
05 继承及多态
Created
2025-06-04
|
Updated
2025-06-04
|
03-C++
|
Post Views:
Author:
Li Ruiqi
Link:
https://li-ruiqi777.github.io/03-C++/05-%E7%BB%A7%E6%89%BF%E5%8F%8A%E5%A4%9A%E6%80%81.html
Copyright Notice:
All articles on this blog are licensed under
CC BY-NC-SA 4.0
unless otherwise stated.
Previous
04 构造函数
构造函数分类 C++中有一下几类构造函数 以一下这个类为例: 1234class Person{ int age; std::string name;}; 1.默认构造函数没有参数,用于创建一个具有默认值的Person对象。 1Person()=default; 2.参数化构造函数1Person(int a, std::string n) : age(a), name(n) {} 3.拷贝构造函数使用另一个对象来初始化当前对象。 1Person(const Person& other) : age(other.age), name(other.name)...
Next
02 QMake的基本用法
QMake的基本用法QMake是和CMake类似的项目组织工具,不过比CMAKE简单不少 官方文档:https://doc.qt.io/qt-5/qmake-manual.html 本地的Qt安装目录也有,和官方文档一致 1.QMake添加源/头/UI等文件12345678910111213SOURCES += \ $$files(UserAPP/Src/*.cpp) \ $$files(UserAPP/Src/*.c) \# main.cpp \# mainwindow.cppHEADERS += \ $$files(UserAPP/Inc/*.h)# mainwindow.hINCLUDEPATH += UserAPP/Inc/FORMS += \# ...
Li Ruiqi
总有低谷
Articles
140
Tags
0
Categories
18
Follow Me