-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairline.cpp
More file actions
34 lines (29 loc) · 780 Bytes
/
airline.cpp
File metadata and controls
34 lines (29 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
#include <fstream>
#include <vector>
#include <string>
#include "airline.h"
using namespace std;
airline::airline(string name, vector<flight> flights, int total_num = 0){
nameM = name;
flight_listM = flights;
number_of_flightsM = total_num;
}
airline::airline(const airline& src){
nameM = src.nameM;
flight_listM = src.flight_listM;
number_of_flightsM = src.number_of_flightsM;
}
airline& airline::operator=(const airline& rhs){
if(this != &rhs) {
nameM = rhs.nameM;
flight_listM = rhs.flight_listM;
number_of_flightsM = rhs.number_of_flightsM;
}
return *this;
}
airline::~airline(){
int number_of_flights = 0;
nameM.clear();
flight_listM.clear();
}