-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusing_it.cpp
More file actions
43 lines (42 loc) · 791 Bytes
/
using_it.cpp
File metadata and controls
43 lines (42 loc) · 791 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
35
36
37
38
39
40
41
42
43
#include <fstream>
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
char tree[15][30];
ifstream seatPrice;
ifstream seatAvaliability;
seatAvaliability.open("SeatAvailability.txt");
seatPrice.open("SeatPrices.txt");
if(!seatAvaliability&&!seatPrice)
{
cout<<"Error opening files. \n";
cout<<endl;
}
else
{
for (int i = 0 ;i < 15; i++)
{
for (int j = 0; j < 30; j++)
{
seatAvaliability>>tree[i][j];
}
}
/*for (int i = 0 ;i < 15; i++)
{
seatPrice>>s[i][0].price;
}*/
for (int i = 0 ;i < 15; i++)
{
for (int j = 0; j < 30; j++)
{
cout<<tree[i][j];
}
cout<<endl;
}
seatAvaliability.close();
seatPrice.close();
}
}