J
JasBascom
if i had a ifstream object
ifstream validdata;
then with the following code.
int list;
union Allrecords record
ifstream validdata;
then with the following code.
int list;
union Allrecords record
union Allrecords *rec = record;
int offset = 1;
int reccount
validdata.seekg(-offset, ios::end);
filesize = validdata.tellg();
validdata.seekg(offset, ios::beg);
reccount = filesize/sizeof(Allrecords);
rec = new(Allrecords[reccount]);
validdata.read((char*) rec, filesize);
this compiles ok, but when I try to execute I get a debug assertion error.
in short I would like to be able to read rec from validdata.