summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
blob: 617f37bc584c2fef5ed6b2d6a65f4214e435a63a (plain) (blame)
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
//Lab 3



#include <iostream>
#include <fstream>	// For the files!!!!
#include <iomanip>	// For manipulators & formatting options
using std::cin;
using std::cout;
using std::endl;
using std::setw;
using std::ios;

using std::ifstream;
using std::ofstream;


const int MAX = 100;

int ReadData(ifstream& inFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[], float tfare[]);
void WriteOutputFile(ofstream& outFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[],
	int counter);
void PrintTotalsAndSummary(ofstream& out, int totalRecords);

int main()
{

}

int ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
{
    int counter = 0;
    inFile >> name[counter] >> age[counter];

    while (!inFile.eof())
    {
        cout << setiosflags(ios::left) << setw(25)
            << name[counter] << resetiosflags(ios::left)
            << setw(4) << age[counter] << endl;
        counter++;
        inFile >> name[counter] >> age[counter];
    }

    return counter;