Skip to content

Commit

Permalink
called function in main function to check output
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahbigk77 committed Apr 23, 2022
1 parent b0939a9 commit 396eb19
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions project5.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,43 @@ using namespace std;
* check if we are at the end of the file
*/
bool eof() {
char c;
cin >> c;
// if the fie is ended, return true
if (cin.eof()) {
return true;
} else {
// if the file contains more data, return the previously gotten
// data to cin
cin.unget();
return false;
}
char c;
std::cin >> c;
// if the fie is ended, return true
if (std::cin.eof()) {
return true;
} else {
// if the file contains more data, return the previously gotten
// data to cin
std::cin.unget();
return false;
}
}

int main(int argc, char *argv[]) {
// Repeatedly read input from standard input
while (!eof()) {
// create a new graph for each loop, which will read all of the
// corresponding data per graph
Province theProvince(cin);
// Repeatedly read input from standard input
while (!eof()) {
// create a new graph for each loop, which will read all of the
// corresponding data per graph
Province theProvince(cin);

cout << endl;
cout << "------------------------------------------------" << endl;
cout << "---------------- New DataSet: ------------------" << endl;
cout << "------------------------------------------------" << endl;
cout << endl;
std::cout << std::endl;
std::cout << "------------------------------------------------" << std::endl;
std::cout << "---------------- New DataSet: ------------------" << std::endl;
std::cout << "------------------------------------------------" << std::endl;
std::cout << std::endl;

theProvince.printAll(0, cout);
theProvince.printAll(0, cout);

}

theProvince.printShortestPath(std::cout);

std::cout << std::endl;
std::cout << "------------------------------------------------" << std::endl;
std::cout << "------------------------------------------------" << std::endl;
std::cout << std::endl;



}
}

0 comments on commit 396eb19

Please sign in to comment.