#include "stdafx.h" #include "CSpellHandler.h" void CSpellHandler::loadSpells() { std::ifstream inp("H3bitmap.lod\\SPTRAITS.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 int hmcr=0; for(i; i