Add an explicit error message for files that can't be opened

This commit is contained in:
Stefan Haustein 2020-07-05 13:15:42 +02:00
parent 134ca73909
commit 37dc1f9b07

View file

@ -1,6 +1,7 @@
#include <iostream>
#include <bitset>
#include <cmath>
#include <fstream>
#include <map>
#include <string>
#include <vector>
@ -506,7 +507,12 @@ int main(int argc, char* argv[]) {
}
}
} else {
std::ifstream fin(arg.c_str());
if (fin) {
file_names.push_back(arg);
} else {
std::cerr << "Can't open file (permission?): " << arg << std::endl;
}
}
}
}