Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FILE_H
- #define FILE_H
- #include "headquarter.h"
- namespace file{
- static std::string ReadFileData(const char* Address){
- std::ifstream FilePos(Address);
- std::string temp;
- std::string Data;
- if(FilePos.is_open())
- while(std::getline(FilePos,temp))
- Data += temp + '\n';
- else{
- FilePos.close();
- throw -1;
- }
- FilePos.close();
- return Data;
- }
- }
- #endif // FILE_H
Add Comment
Please, Sign In to add comment