added path argument
This commit is contained in:
17
src/main.cpp
17
src/main.cpp
@@ -2,12 +2,21 @@
|
||||
// Created by black on 12.06.25.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "Manager.h"
|
||||
|
||||
int main() {
|
||||
Manager::getInstance().init(
|
||||
"/home/black/Nextcloud/Dokumente/Dokumente/Hochschule/2. Semester/Rechnerarchitektur/Projekt/test.txt"
|
||||
);
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 2) {
|
||||
// Kein Pfad übergeben, Fehlermeldung ausgeben und Programm beenden
|
||||
std::cerr << "Bitte Pfad zur Datei als Argument angeben." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const std::string path = argv[1];
|
||||
|
||||
Manager::getInstance().init(path);
|
||||
Manager::getInstance().run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user