Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Read’s data
- string readAllDataFromFile(string theFileName)
- {
- string *fileName = new string;
- *fileName = theFileName;
- string *theOutData = new string;
- ifstream fileIn;
- fileIn.open(*fileName, ios::in | ios::binary);
- {
- string str((istreambuf_iterator<char>(fileIn)), istreambuf_iterator<char>());
- *theOutData = str;
- fileIn.close();
- str.resize(10);
- str.shrink_to_fit();
- }
- delete(fileName);
- return *theOutData;
- }
Advertisement
Add Comment
Please, Sign In to add comment