摘要: 11——3 #include<fstream>using namespace std;int main(){ ofstream file; file.open("test1.txt",ios_base::binary); file<<"已成功添加字符!"; file.close(); return 阅读全文
posted @ 2018-06-20 22:53 童梦奇缘 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-05-31 22:13 童梦奇缘 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1.#include <iostream>#include <vector>#include <string>using namespace std;// 函数声明 void output1(vector<string> &); void output2(vector<string> &); int 阅读全文
posted @ 2018-05-22 20:08 童梦奇缘 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 实验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); 阅读全文
posted @ 2018-04-22 22:49 童梦奇缘 阅读(103) 评论(1) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2018-04-08 22:08 童梦奇缘 阅读(90) 评论(5) 推荐(0) 编辑
摘要: //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!= 阅读全文
posted @ 2018-03-24 22:08 童梦奇缘 阅读(108) 评论(0) 推荐(0) 编辑
摘要: //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 阅读全文
posted @ 2018-03-16 12:40 童梦奇缘 阅读(119) 评论(1) 推荐(0) 编辑