
C++
qq_45911550
蚓无爪牙筋骨,唯用心也。
展开
-
ubuntu下将Qt程序打包为exe
参考链接原创 2021-05-29 20:15:26 · 2018 阅读 · 0 评论 -
c++的copy construction
拷贝构造函数是一种特殊的构造函数,假设现在有一个构造函数App,则拷贝构造函数的形式为:App(const App& c)函数的名称必须和类名称一致,它必须的一个参数是本类型的一个引用变量。原创 2021-01-29 16:33:39 · 189 阅读 · 0 评论 -
C/C++定义常量的方法之一
#define LENGTH 10const int LENGTH = 10;The two methods are equivalent.原创 2020-12-08 19:58:07 · 182 阅读 · 0 评论 -
单链表--直接插入排序--C++
#include<iostream>using namespace std;struct Node{ int data; Node *next;};class LinkList {public: LinkList(int a[], int n);//头插法构造一个带头结点的单链表 int Sort_Insert();// 插入排序函数 void Show();private: int k;// 链表中元素的个数 Node *first, *s, *p, *m, *r,原创 2020-12-05 21:13:48 · 1038 阅读 · 0 评论 -
无向图的构造遍历--C++
构造如图所示的的无向图:#include<iostream>using namespace std;#define MaxSize 10//图中最多的顶点个数class MGraph {public: MGraph(int a[], int n, int e); void DFSTraverse(int v);//深度优先遍历 void BFSTraverse(int v);//广度优先 void clear();//清空访问标记private: int vertex原创 2020-12-05 21:12:09 · 683 阅读 · 0 评论 -
二叉树构造遍历--C++
#include<iostream>using namespace std;struct BiNode{ int data; BiNode *lchild, *rchild;};class BiTree {public: BiTree() { root = Creat(root); } ~BiTree() { Release(root); } void PreOrder() { PreOrder(root); } void InOrder() { InOrder(root原创 2020-12-05 21:10:04 · 106 阅读 · 0 评论 -
循环队列--单链表--C++
#include<iostream>using namespace std;struct Node { int data; Node *next;};class Circle {public: Circle(int a[], int n); void Show(int n);// 显示,n为要显示的数据个数 void Entry(int n);//入队函数,n为要添加的节点的值,为整型 void Exit();// 出队函数private: Node *first, *原创 2020-12-05 21:07:59 · 389 阅读 · 0 评论 -
关于使用C++写数据块
提供一些自己写的运行成功的代码以供初学者参考:废话不多说,直接上代码,上面写了一些注释,以供参考这是写入文件的代码:#include<iostream>#define N 1using namespace std;struct U_school{ char name[10]; int age; double point;};int main(){ struct U_school u = {"任奥维",20,80}; FILE* p;原创 2020-06-13 15:49:59 · 538 阅读 · 0 评论 -
vs输出框闪退的问题
两种解决办法:1、运行时按CTRL+F5;2、在main函数中,在return 0的上一句加上system(“pause”);原创 2020-11-25 14:07:19 · 296 阅读 · 0 评论