代码改变世界

实验六

2019-06-17 21:05 by Chirly, 177 阅读, 0 推荐, 收藏, 编辑
摘要:1. #include <iostream> #include <fstream> #include <cstring> #include <cstdlib> using namespace std; int main() { string filename1, filename2, newfile 阅读全文

实验五

2019-06-01 17:42 by Chirly, 119 阅读, 0 推荐, 收藏, 编辑
摘要:#include <iostream> #include <string> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname(s){}; string getNickname() 阅读全文

实验四

2019-05-20 21:25 by Chirly, 127 阅读, 0 推荐, 收藏, 编辑
摘要:一. #include <iostream> using namespace std; #include "car.h" #include "electricCar.h" int main() { // 测试Car类 Car oldcar("Audi","a4",2016); cout << " o 阅读全文

实验三

2019-04-21 17:37 by Chirly, 117 阅读, 0 推荐, 收藏, 编辑
摘要:Part 2 #include <iostream> #include "graph.h" using namespace std; int main() { Graph graph1('*',5); graph1.draw(); system("pause"); system("cls"); Gr 阅读全文

设计、定义并实现Complex类

2019-03-31 16:24 by Chirly, 86 阅读, 0 推荐, 收藏, 编辑
摘要:设计、定义并实现Complex类 #include<iostream> #include<cmath> using namespace std; class Complex{ public: Complex(double real1=0,double imaginary1=0); Complex(C 阅读全文

实验二

2019-03-24 22:54 by Chirly, 168 阅读, 0 推荐, 收藏, 编辑
摘要:1.编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。 #include <iostream> using namespace std; struct complex{ double real; double ima 阅读全文

实验一

2019-03-17 17:20 by Chirly, 200 阅读, 0 推荐, 收藏, 编辑
摘要:2-28 实现一个简单的菜单程序,运行时显示“Menu:A(dd) D(elete) S(ort) Q(uit),Selete one:”提示用户输入。A表示增加,D表示删除,S表示排序,Q表示退出。输入为A、D、S时分别提示“数据已经增加、删除、排序。”,输入Q时程序结束。 ①if...else语 阅读全文