Plik testowy, importy i funkcja zapisująca do pliku

This commit is contained in:
2023-02-22 17:27:57 +01:00
parent f4b109c96a
commit 4cbfef5bc2
3 changed files with 10 additions and 0 deletions

View File

@@ -69,6 +69,14 @@ void dijkstruj(mapa doDijkstrnięcia){
}
}
void dumpOutput(string outputFile, string preparedString)
{
ofstream file(outputFile);
file << preparedString;
}
/**
* @brief Funkcja parsująca dane wejściowe.
*
@@ -127,6 +135,7 @@ int main (int argc, char *argv[])
parseInput(plikWejsciowy);
dijkstruj(mapaOdległości);
plikWyjsciowy = result["output"].as<string>();
} else {
std::cout << std::endl << "Błąd - nie podano wymaganych parametrów" << std::endl << std::endl << std::endl << options.help() << std::endl;
exit(3);