摘要:
Part2 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { string filename1, filename2, newfi 阅读全文
摘要:
#include <iostream> #include <string> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname(s){}; string getNickname(); 阅读全文
摘要:
#ifndef BATTERY_H #define BATTERY_H class Battery { public: Battery(int batterySize0=70); int showbattery()const; int batterySize; }; #endif #include" 阅读全文
摘要:
Part2 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char symbol 阅读全文
摘要:
#include<iostream> #include<cmath> using namespace std; class Complex{ public: Complex(double x,double y); Complex(Complex &a); void add(Complex a); v 阅读全文
摘要:
一、函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型数据,调用测试。 #include<iostream> using namespace std; struct complex{ double real; dou 阅读全文
摘要:
实验结论2-28 第一种方法使用while #include<iostream> using namespace std; int main(){ char i; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; while(1 阅读全文