摘要:
1、合并两个文件到新文件中。文件名均从键盘输入 2、使用文件I/O流,以文本方式打开Part1中合并后的文件,在文件最后一行添加字符"merge successfully. 3.随机抽人 4、统计字符数 1、这次实验使用了很多的新知识,我靠着不停翻书加上请教室友才明白文件的输入输出的方式。 2、随机 阅读全文
摘要:
#include <iostream> using namespace std; // 基类Base1 class Base1 { public: void display() const {cout << "Base1::display()" << endl; } }; // 派生类Base2,公 阅读全文
摘要:
1、车辆类的实现 battery.h #ifndef BATTERY_H#define BATTERY_Hclass Battery{public: Battery(int a=70); int getbatterysize();private: int batterysize;};#endif b 阅读全文
摘要:
part1: void Graph::draw() { int i,a,b,t; a=size; b=size; t=1; while(a--) { for(i=0;i<b-1;i++) cout<<' '; for(i=0;i<t;i++) cout<<symbol; for(i=0;i<b-1; 阅读全文
摘要:
#include<iostream>#include<cmath>using namespace std;class complex{public: complex(double x1,double y1); complex(double x1); complex(complex &c1); voi 阅读全文
摘要:
函数重载: #include<iostream> using namespace std; struct complex{ double real; double imaginary; }; int add(int,int); double add(double,double); complex a 阅读全文
摘要:
2-28 #include<iostream> using namespace std; int main(){ char choice; while(1) { cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"; cin>>choice; i 阅读全文