Guest User

Untitled

a guest
Jun 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #ifndef FILE_H
  2. #define FILE_H
  3.  
  4. #include "headquarter.h"
  5.  
  6. namespace file{
  7. static std::string ReadFileData(const char* Address){
  8. std::ifstream FilePos(Address);
  9. std::string temp;
  10. std::string Data;
  11. if(FilePos.is_open())
  12. while(std::getline(FilePos,temp))
  13. Data += temp + '\n';
  14. else{
  15. FilePos.close();
  16. throw -1;
  17. }
  18. FilePos.close();
  19. return Data;
  20. }
  21. }
  22.  
  23. #endif // FILE_H
Add Comment
Please, Sign In to add comment