car.h

来自「是一款车库模拟控制系统,可以实现对当前车库存车状态的实时描述.」· C头文件 代码 · 共 40 行

H
40
字号
// Car.h: interface for the CCar class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CAR_H__9369D6A6_012F_4D17_ADD2_F7CEA64905EE__INCLUDED_)
#define AFX_CAR_H__9369D6A6_012F_4D17_ADD2_F7CEA64905EE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CCar  
{
public:
	CString numberPlate;	//
	int size;
							//0 if small,1 if middle, 2 if carriage, 3 if truck
	int unitPrice;
	int totalFare;          //
	int parkPlace;			//所停的位置,由车库类为其分配
	int keepFee;
	CString enterTime;
	COleDateTime inTime;			//
	
public:
	CCar(CString m,CString n,int carSize):numberPlate(m),enterTime(n),size(carSize)
	{
		inTime.ParseDateTime(enterTime);
	}
	virtual int getCharge(){
		return 0;
	}
	void setUnitPrice(int a){
		unitPrice=a;
	}
};

#endif // !defined(AFX_CAR_H__9369D6A6_012F_4D17_ADD2_F7CEA64905EE__INCLUDED_)

⌨️ 快捷键说明

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