Update usage message in main function to display program name dynamically

This commit is contained in:
2025-05-05 16:42:04 +08:00
parent 9d001682c1
commit b94126ae63
2 changed files with 3 additions and 1 deletions
+3 -1
View File
@@ -93,7 +93,9 @@ int main(int argc, char** argv) {
} }
if (no_opt == true) { if (no_opt == true) {
cout << "Usage: " << argv[0] << " -f <filename> [-r <truncate>] [-t <testnames>] [-h]\n"; vector<string> prog_path = tokenize(argv[0], "\\");
string prog_name = prog_path.back();
cout << "Usage: " << prog_name << " -f <filename> [-r <truncate>] [-t <testnames>] [-h]\n";
cout << "\tOptions:\n"; cout << "\tOptions:\n";
cout << "\t\t-f => Specify .datalog file name\n"; cout << "\t\t-f => Specify .datalog file name\n";
Binary file not shown.