Advertisement
fklffd

Untitled

Nov 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int parse()
  7. {
  8. ifstream file("text.txt");
  9. if (!file.is_open()) {
  10. cout << "File not found." << endl;
  11. return 1;
  12. } else {
  13. ...
  14. }
  15. file.close();
  16. return 0;
  17. }
  18.  
  19. int main()
  20. {
  21. if (parse() == 1) {
  22. return 1;
  23. }
  24. cout << "The program is executed correctly." << endl;
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement