
C++
小白的C++的学习笔记
gtuif
大多数人永远都不会了解真实的你,但是他们会看到你所做的一切。。。
展开
-
Huffman Code
运行标准:C++11#include<bits/stdc++.h>#define BinFile "Binfile.bin"#define TestFile "TestFile.txt"using namespace std;typedef struct node{ char key = '\0'; int Weight = 0; struct node *Leftnode = nullptr; struct node *Rightnode = nullptr;}Tree原创 2021-12-06 16:50:04 · 713 阅读 · 0 评论 -
Codeforce GoodBye2020 A - C
A. Bovine Dilemmatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArgus was charged with guarding Io, which is not an ordinary cow. Io is quite an explorer, and she wanders off rather fr原创 2020-12-31 23:26:26 · 427 阅读 · 0 评论 -
构造函数与析构函数
构造函数:当一个对象被创建时,通过构造函数将对象中的值初始化为特定的值;析构函数:执行对象消失前的清尾工作,在对象生存期快要结束时候自动调用的;实例:#include <iostream>using namespace std;class Point{public : Point(int xx, int yy) //构造函数 定义为有参数 ...原创 2020-04-27 11:32:01 · 252 阅读 · 0 评论