char* readFileBytes(const char *name, size_t *len) { ifstream fl(name); fl.seekg(0, ios::end); *len = fl.tellg(); char *ret = new char[*len]; fl.seekg(0, ios::beg); fl.read(ret, *len); fl.close(); return ret; }