摘要: 虚函数加上一个virtual就行了。#include using namespace std;class A { public: A(int x):a(x) {} virtual void display() { ... 阅读全文
posted @ 2019-01-14 21:51 xyee 阅读(183) 评论(0) 推荐(0)
摘要: 提纲一操作系统的定义,各章节名词定义。分时多道…OS四大特征,五大功能。二进程创建终止挂起激活PCB原语:创建终止挂起激活唤醒互斥和同步,临界资源,临界区信号量的基础概念,受保护的数据结构,功能是实现进程同步的,赋初值,p-1 v+1进程通讯,低级高级,数据... 阅读全文
posted @ 2019-01-14 17:17 xyee 阅读(180) 评论(0) 推荐(0)
摘要: #include using namespace std;class Time { public: Time(int m=0,int s=0):min(m),sec(s){} Time operator++() { ... 阅读全文
posted @ 2019-01-14 10:49 xyee 阅读(169) 评论(0) 推荐(0)
摘要: output管一个复数的输出,return之后再输出其它的复数input同理#include using namespace std;class Complex { public: friend ostream & operator > ... 阅读全文
posted @ 2019-01-14 10:18 xyee 阅读(644) 评论(0) 推荐(0)
摘要: #include using namespace std;class Complex { public: Complex(double r=0,double i=0):real(r),imag(i){} Complex operator + (Compl... 阅读全文
posted @ 2019-01-14 09:54 xyee 阅读(207) 评论(0) 推荐(0)