📄 person.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -