person.h

来自「非常完整的电梯模拟系统 欢迎大家提出宝贵建议」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef PERSON_STRUCT
#define PERSON_STRUCT

#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
#include <time.h>
#include <iomanip.h>

struct Person
{
	int at;                   //at floor
	int to;                   //destinate flooar
	int weight;
	Person(){}
	Person(int a,int t,int w)
	{
		at=a;
		to=t;
		weight=w;
	}
	friend ostream & operator<<(ostream & os,Person &p)
	{
		os<<"\t初始楼层:"<< p.at << endl
			<< "\t到达楼层:" << p.to << endl
			<< "\t该人的体重:" << p.weight << endl;
		return os;
	}
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?