I use this code for file opening and allocating heap memory:
std::ifstream in;
const char * buffer;
long ptr;
long size;
std::vector<OBJ_T *> objects_list; // list of objects readed by file
int open_file(string Pfile)
{
ptr=0;
in.open(Pfile.c_str());
if (!in.is_open()) die...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.