Advertisement
Guest User

shit

a guest
Apr 26th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. //preset carpark
  2.     CarPark *carpark = new CarPark[numCarPark];
  3.     int *numSlot = new int[numCarPark];
  4.     double *Pfee = new double[numCarPark];
  5.     int slot[3] = { 6,30,20 };
  6.     int slot2[3] = { 1,5,3 };
  7.     int slot3[3] = { 8,20,10 };
  8.     double fee[3] = { 25,28,28 };
  9.     double fee2[3] = { 30,36,32 };
  10.     double fee3[3] = { 15,22,20 };
  11.    
  12.     for (int i = 0; i < numCarPark;i++) {
  13.         numSlot[i] = slot[i];
  14.         Pfee[i] = fee[i];
  15.     }
  16.     carpark[0] = CarPark(numSlot, Pfee, "Happy Parking", "Happy Valley");
  17.  
  18.     for (int i = 0; i < numCarPark; i++) {
  19.         numSlot[i] = slot[i];
  20.         Pfee[i] = fee[i];
  21.     }
  22.     carpark[1] = CarPark(numSlot, Pfee, "Wealthy Parking", "Mong Kok");
  23.     for (int i = 0; i < numCarPark; i++) {
  24.         numSlot[i] = slot2[i];
  25.         Pfee[i] = fee2[i];
  26.     }
  27.     carpark[2] = CarPark(numSlot, Pfee, "Come Parking", "Kowloon Tong");
  28.     for (int i = 0; i < numCarPark; i++) {
  29.         numSlot[i] = slot3[i];
  30.         Pfee[i] = fee3[i];
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement