C++
米老鼠kkkk
菜袅
展开
-
操作系统-动态分区-磁盘调度2021-01-09
动态分区管理 动态分区管理的主存分配模拟系统的设计—最先适应法、最佳适应法、最坏适应法(选择1~3种),模拟实现内存的分配回收;能够输入给定的内存大小,进程的个数,每个进程所需内存空间的大小等;能够选择分配或回收操作;并能显示完成内存分配或回收后内存空间的使用情况;能够显示进程在内存的存储地址、大小等。 // os_test1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include "t1.h" using na原创 2021-01-09 16:11:54 · 254 阅读 · 0 评论 -
c++内联函数,圆面积
//内联函数,圆面积 #include <iostream> using namespace std; inline double CircleArea(double radius)//计算圆面积,内联函数 { return 3.14159*radius*radius; } int main() { double r, area; cout << "please i...原创 2019-04-16 19:58:25 · 1491 阅读 · 0 评论 -
C++点类派生三角形求面积,周长,构造析构函数
仅供参考 #include <iostream> #include <math.h> using namespace std; class myPoint { public: myPoint(double x0 = 0.0, double y0 = 0.0) :x(x0), y(y0) {} myPoint(myPoint &np) :x(np.x), y(np...原创 2019-04-16 00:21:37 · 1603 阅读 · 0 评论 -
C++求矩形面积,定义类
//分享给初学者 #include<iostream>//求面积 #include<stdlib.h> using namespace std; class JuXing { private: double l, x; public: JuXing(double a, double b) { l = a; x = b; } void s() { cout<...原创 2019-04-14 02:12:23 · 4499 阅读 · 0 评论