Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool isFileCorrect(string path)
- {
- string inputline;
- regex regular("\\d\\s*");
- fstream fin(path, std::ios_base::in);
- bool isCorrect = true;
- while (!fin.eof() && isCorrect)
- {
- getline(fin, inputline);
- if (!(regex_match(inputline.c_str(), regular)))
- isCorrect = false;
- }
- fin.close();
- return isCorrect;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement