Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class train : public MyList
- {
- public:
- int num;
- string station;
- int time[2] ;
- train()
- {
- train::num=0;
- train::station="";
- train::time[0]=0;
- train::time[1]=0;
- }
- void add_train()
- {
- train *curr=this;
- cout<<"Enter num"<<endl;
- cin>>curr->num;
- cout<<"Enter station"<<endl;
- cin>>curr->station;
- cout<<"Enter time"<<endl;
- cin>>curr->time[0];
- cin>>curr->time[1];
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement