摘要:
1.合并两个文件 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { string filename1, filename2, ne
阅读全文
posted @ 2019-06-16 16:34
domestic徐婷楠
阅读(138)
推荐(0)
摘要:
1 #include<string> 2 using namespace std; 3 #ifndef PETS_H 4 #define PETS_H 5 class MachinePets{ 6 public: 7 MachinePets(const string s):Nickname(s){}
阅读全文
posted @ 2019-06-02 13:14
domestic徐婷楠
阅读(94)
推荐(0)
摘要:
1.Car #ifndef BATTERY_H #define BATTERY_H class Battery{ public: Battery(int size = 70); int rebattery(); int batterySize; }; #endif #ifndef CAR_H #de
阅读全文
posted @ 2019-05-19 09:11
domestic徐婷楠
阅读(103)
推荐(0)
摘要:
1.小球测试 2.画布 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char
阅读全文
posted @ 2019-04-20 17:39
domestic徐婷楠
阅读(181)
推荐(0)
摘要:
实验总结: 一开始写这个程序的时候完全没理解题目意思,不知从何下手,后来自己理解明白了,打出来的程序太过麻烦而且有问题,最后自己找了些资料,改了程序最后变成了这个版本,希望大家帮我再找些错误,让我的程序条理更加清晰,更加优化。 评论: 1.https://www.cnblogs.com/shenqi
阅读全文
posted @ 2019-03-31 16:02
domestic徐婷楠
阅读(155)
推荐(0)
摘要:
1.函数重载 #ifndef HEADER_H #define HEADER_H #include<iostream> using namespace std; template<class T> void add(T a, T b) { T n; n = a + b; cout << n << e
阅读全文
posted @ 2019-03-24 12:14
domestic徐婷楠
阅读(157)
推荐(0)
摘要:
1.(1)用if...else实现简单的菜单程序 #include<iostream> using namespace std; int main() { char c; cout << "Menu: A(dd) D(elete) S(ort) Q(uit):"; cin >> c; while (
阅读全文
posted @ 2019-03-16 14:42
domestic徐婷楠
阅读(101)
推荐(0)