J
JasBascom
if i have an ifstream object
ifstream validdata;
const int list = 5;
Allrecords books;
Allrecords *rec = books
ifstream validdata;
const int list = 5;
Allrecords books;
Allrecords *rec = books
- ;
if i had the following code
validdata.seekg(0, ios::end);
filesize = validdata.tellg();
validdata.seekg(offset, ios::beg);
reccount = filesize/sizeof(Allrecords);
rec = new(Allrecords[reccount]);
validdata.read((char*) rec, filesize);
the last line is causing a debug assertion error. without this line the code
executes ok. What I would like to know is there another way of reading a union,
using the read function. Or a type conversion for (char*)