Add an explicit error message for files that can't be opened
This commit is contained in:
parent
134ca73909
commit
37dc1f9b07
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue