⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checi.h

📁 火车定票系统
💻 H
字号:
#ifndef Checi_H
#define Checi_H
#include<iostream.h>
#include<string.h>
#include"station.h"
class   CheCi//CheCi作单链表节点类
{//friend class TLxitong;
public:

	char TrainNum[5]; //车次号
	char start[15]; //始发站名
	char end[15];//终点站名
	char Stime[6];//始发时间:形式如:05:10,14:02
	char Etime[6];//终点时间
	int Zprice;//全程票价
	int Count;//票量
	Station * p;//指向一结点为Station类的链表,此链表以该车次的所有站点为结点
    CheCi *link;//指向下一车次
	CheCi() :  link(NULL) {}
	CheCi(CheCi *p) :  link(p) {}
	CheCi operator = (CheCi pp)
   {
	   strcpy(TrainNum,pp.TrainNum);
	   strcpy(start,pp.start);
	   strcpy(end,pp.end);
	   strcpy(Stime,pp.Stime);
	   strcpy(Etime,pp.Etime);
	   Zprice=pp.Zprice;
	   Count=pp.Count;
	   p=pp.p;
	   link=pp.link;
	   return *this;
   }
void display()
   {
	   cout<<"车次  "<<TrainNum<<"始发站名  "<<start<<"始发时间  "<<Stime<<endl;
	   Station * temp=p;
	   cout<<"途经: ";
	   while(temp!=NULL)
	   { 
		  temp->STdisplay();
		   temp=temp->next;
	   }
		   
   }


};
#endif

⌨️ 快捷键说明

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