#include <iostream> //just for std::cin.get();
#include <ifstream>
#include <string>
int main()
{
std::string full_content, filename{ "data.txt" };
std::ifstream ifs(filename, std::ios::binary | std::ios::ate);
const unsigned int n = static_cast<unsigned int>(ifs.tellg());
full_content.resize(n);
ifs.seekg(0, std::ios::beg);
ifs.read(&full_content[0], static_cast<std::streamsize>(n));
std::cin.get(); //pause
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPiAvL2p1c3QgZm9yIHN0ZDo6Y2luLmdldCgpOwojaW5jbHVkZSA8aWZzdHJlYW0+CiNpbmNsdWRlIDxzdHJpbmc+CgppbnQgbWFpbigpCnsKCXN0ZDo6c3RyaW5nIGZ1bGxfY29udGVudCwgZmlsZW5hbWV7ICJkYXRhLnR4dCIgfTsKCXN0ZDo6aWZzdHJlYW0gaWZzKGZpbGVuYW1lLCBzdGQ6Omlvczo6YmluYXJ5IHwgc3RkOjppb3M6OmF0ZSk7Cgljb25zdCB1bnNpZ25lZCBpbnQgbiA9IHN0YXRpY19jYXN0PHVuc2lnbmVkIGludD4oaWZzLnRlbGxnKCkpOwoJCglmdWxsX2NvbnRlbnQucmVzaXplKG4pOwoJaWZzLnNlZWtnKDAsIHN0ZDo6aW9zOjpiZWcpOwoJaWZzLnJlYWQoJmZ1bGxfY29udGVudFswXSwgc3RhdGljX2Nhc3Q8c3RkOjpzdHJlYW1zaXplPihuKSk7CgkKCXN0ZDo6Y2luLmdldCgpOyAvL3BhdXNlCglyZXR1cm4gMDsKfQ==