摘要:
11——3 #include<fstream>using namespace std;int main(){ ofstream file; file.open("test1.txt",ios_base::binary); file<<"已成功添加字符!"; file.close(); return 阅读全文
摘要:
1.芯片 class xinpian{ public: xinpian(int m0,int n0); void jia(); private: int m; int n; }; class xinpianA:public xinpian{ public: xinpianA(int m0,int n 阅读全文
摘要:
1.#include <iostream>#include <vector>#include <string>using namespace std;// 函数声明 void output1(vector<string> &); void output2(vector<string> &); int 阅读全文
摘要:
实验1,4—20重写 //类定义,Complex.hclass Complex { public: Complex( double at, double bt) :a(at),b(bt) {} Complex( double at) { a=at; } void add(Complex &num); 阅读全文
摘要:
#include<iostream>using namespace std;class rect{ public: rect(float L=1.0,float W=1.0){ length=L; wide=W; } area(){ cout<<length*wide; } private: flo 阅读全文
摘要:
//2-28-(1) #include <iostream>using namespace std;int main(){ char x; cout<<"Menu: A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; cin>>x; while (x!= 阅读全文
摘要:
//2_4练习.cpp#include<iostream>using namespace std;int main(){ int day; cout<<"please enter the number between1-7"<<endl; cin>>day; switch(day){ //注意cas 阅读全文