-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsrc.h
85 lines (70 loc) · 1.81 KB
/
rsrc.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <conio.h>
#include <list>
#include <Windows.h>
using namespace std;
//--------- Helping Functions ---------//
void psw_in(string& a);
void num_in(string& a);
template <class td>
bool find(list<td> &l, td s);
//--------- Structures and Classes ---------//
struct user {
string name, psw;
};
class contact {
protected:
string name, address, number, cnic;
public:
contact();
bool operator == (contact& b);
friend istream& operator >> (istream& in, contact& a);
friend ostream& operator << (ostream& out, contact& a);
friend void get();
friend void put();
string str();
};
class date {
protected:
int day, month, year;
public:
date();
string str();
bool operator == (date& b);
friend istream& operator >> (istream& in, date& a);
friend ostream& operator << (ostream& out, date& a);
friend void get();
friend void put();
};
class reservation {
protected:
contact reserver;
string source, destination;
date arrival_date;
string ticket_no;
char clas;
int fare;
public:
static int base_fare;
reservation();
void in(list<string> stations);
void put(ofstream& out);
friend ostream& operator << (ostream& out, reservation& a);
friend void get();
friend void put();
string ticket();
bool operator == (reservation b);
static void set_base_fare(int f);
static int get_base_fare();
};
//--------- Friend Functions ---------//
istream& operator >> (istream& in, user& a);
ofstream& operator << (ofstream& out, user& a);
istream& operator >> (istream& in, contact& a);
ostream& operator << (ostream& out, contact& a);
istream& operator >> (istream& in, date& a);
ostream& operator << (ostream& out, date& a);
ostream& operator << (ostream& out, reservation& a);