2019年6月16日
摘要: #include #include using namespace std; int main(){ ofstream fout("3.txt",ios_base::app); fout using std::string; // 函数声明 // 返回当前系统时间,格式诸如20190611 string getCurrentDate(); //utils.cpp #include "uti... 阅读全文
posted @ 2019-06-16 15:56 happy-every-day 阅读(109) 评论(0) 推荐(0) 编辑
  2019年6月3日
摘要: //MachinePets.h #include #include using namespace std; #ifndef MACHINEPETS_H #define MACHINEPETS_H class MachinePets { public: MachinePets(const string s); virtual string talk() const=0; ... 阅读全文
posted @ 2019-06-03 22:47 happy-every-day 阅读(82) 评论(1) 推荐(0) 编辑
  2019年5月21日
摘要: //Array.h #include using namespace std; class Arrayint { public: Arrayint(int n,int value=0); ~Arrayint(); int& operator[](int i); void print(); private: int *p; int size; }; //Array.c... 阅读全文
posted @ 2019-05-21 17:57 happy-every-day 阅读(88) 评论(0) 推荐(0) 编辑
  2019年4月30日
摘要: //info.h#ifndef INFO_H #define INFO_H #include using std::string; class Info { public: Info(string nickname0, string contact0, string city0, int n); void print(); p... 阅读全文
posted @ 2019-04-30 15:05 happy-every-day 阅读(83) 评论(0) 推荐(0) 编辑
摘要: //date.h#ifndef DATE_H #define DATE_H class Date { public: Date(); // 默认构造函数,将日期初始化为1970年1月1日 Date(int y, int m, int d); // 带有形参的构造函数,用形参y,m,d初始化年、月、日 void display(); /... 阅读全文
posted @ 2019-04-30 14:48 happy-every-day 阅读(57) 评论(0) 推荐(0) 编辑
  2019年4月18日
摘要: //main.cpp#include #include"graph.h" using namespace std; int main () { Graph Graph1('*',5); Graph1.draw(); system("pause"); system("cls"); Graph Graph2('$',7); Graph2.draw()... 阅读全文
posted @ 2019-04-18 12:37 happy-every-day 阅读(85) 评论(1) 推荐(0) 编辑
  2019年3月31日
摘要: #include #include using namespace std; class Complex { public: Complex (double xx=0,double yy=0):x(xx),y(yy){} Complex (Complex &c):x(c.x),y(c.y){} void show() { ... 阅读全文
posted @ 2019-03-31 13:56 happy-every-day 阅读(112) 评论(1) 推荐(0) 编辑
  2019年3月24日
摘要: #include using namespace std; struct Complex { double real; double imaginary; }; int add(int x,int y) { int s; s=x+y; cout>a>>b; add(a,b); cin>>c>>d; add(c,d); cin... 阅读全文
posted @ 2019-03-24 09:56 happy-every-day 阅读(84) 评论(1) 推荐(0) 编辑
  2019年3月15日
摘要: 2-28-(1)#include using namespace std;int main() { char n; cout>n; while (n!='Q') { if (n=='A') cout>n; } return 0; } 2-28-(2)#include using namespa... 阅读全文
posted @ 2019-03-15 17:04 happy-every-day 阅读(108) 评论(2) 推荐(0) 编辑