#include "stdafx.h" #include "CGeneralTextHandler.h" #include void CGeneralTextHandler::load() { std::ifstream inp("H3bitmap.lod\\GENRLTXT.TXT", std::ios::in|std::ios::binary); inp.seekg(0,std::ios::end); // na koniec int andame = inp.tellg(); // read length inp.seekg(0,std::ios::beg); // wracamy na poczatek char * bufor = new char[andame]; // allocate memory inp.read((char*)bufor, andame); // read map file to buffer inp.close(); std::string buf = std::string(bufor); delete [andame] bufor; int i=0; //buf iterator for(i; i