Code:
int main()
{
Airport port(0,5);
port.add_flight("Hong Kon", 4, 2, 80, 20);
port.add_flight("aaaa aaaa", 3, 2, 80, 20);
}
Code:
Created Airport at time= 0 and terminal#= 5
Created Flight with Destination= Hong Kon Departs at= 4 and has Duration= 2
Created Flight with Destination= aaaa aaaa Departs at= 3 and has Duration= 2
[COLOR="Red"]Deleted Flight with Destination= Hong Kon and depart time= 4[/COLOR]
Destroyed airport
Deleted Flight with Destination= Hong Kon and depart time= 4
Deleted Flight with Destination= aaaa aaaa and depart time= 3
scenario2
Code:
int main()
{
Airport port(0,5);
port.add_application("egg nog", "Hong Kon", 666, 2, 10, 0);
port.add_application("fat pig", "Hong Kon", 555, 2, 10, 0);
}
Code:
Created Airport at time= 0 and terminal#= 5
Created Application, with name= egg nog Id= 666 Destination= Hong Kon
Created Application, with name= fat pig Id= 555 Destination= Hong Kon
Destroyed airport
Destroyed Appication with name = egg nog Id =666
Destroyed Appication with name = fat pig Id =555
add application
Code:
Application* Applic;
Applic= new Application(...);
waiting_list.push_back(*Applic);
add flight
Code:
Κώδικας:
Flight* flying;
flying= new Flight(...);
terminal.push_back(*flying);
- waiting list is stl list, terminal is stl vector
-if i convert the vector to list, the deconstructors work like normal,but i need vector
-my constructors are simple, only create 2 news for char*, my destructors do nothing other than cout...
why doesnt the application work and the terminal not?(which i understand is vector vs list problem...)