Advertisement
Guest User

kokok

a guest
Apr 1st, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1.  
  2. class train : public MyList
  3.     {
  4.     public:
  5.         int num;
  6.         string station;
  7.         int time[2] ;
  8.         train()
  9.         {
  10.             train::num=0;
  11.             train::station="";
  12.             train::time[0]=0;
  13.             train::time[1]=0;
  14.         }
  15.         void add_train()
  16.         {
  17.             train *curr=this;
  18.             cout<<"Enter num"<<endl;
  19.             cin>>curr->num;
  20.             cout<<"Enter station"<<endl;
  21.             cin>>curr->station;
  22.             cout<<"Enter time"<<endl;
  23.             cin>>curr->time[0];
  24.             cin>>curr->time[1];
  25.         }
  26.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement