diff --git a/project5.cc b/project5.cc index 2d1f12d..f7eaba3 100644 --- a/project5.cc +++ b/project5.cc @@ -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; + + + + } }