Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail comparison (or crash) if file paths are invalid (e.g. file #249

Open
github-actions bot opened this issue Jun 29, 2024 · 0 comments
Open

Fail comparison (or crash) if file paths are invalid (e.g. file #249

github-actions bot opened this issue Jun 29, 2024 · 0 comments

Comments

@github-actions
Copy link

doesn't exist)

Line: 22

// Thanks: https://stackoverflow.com/a/15119347/1153203
bool compare_files(const std::string &filename1, const std::string &filename2) {
// TODO: Fail comparison (or crash) if file paths are invalid (e.g. file
// doesn't exist)
std::ifstream file1(filename1);
std::ifstream file2(filename2);
std::istreambuf_iterator<char> begin1(file1);
std::istreambuf_iterator<char> begin2(file2);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants