-
Can anybody hepl?
are there any problems for these?
void empArray::read () {
return data_io::read (emplist, &inx);
/* fstream data_file;
int count = 0;
int i = 0;
char type;
Temp *t;
PTime *p;
nonExempt *n;
Exempt *x;
Management *m;
data_file.open ("Employee.dat", ios::in | ios::binary);
inx= 0;
while (!data_file.eof()) {
data_file.read (&type, 1);
switch (type) {
case 'M':
m = new Management;
data_file.read ((char*) m, sizeof (Management));
emplist[inx] = (Employee*) m;
(inx) ++;
count ++;
break;
default:
break;
}
}
data_file.close();*/
}
Thx.
J
-
The first thing i see is you have a return at the top of the function before any code so everything after that is ignored.
-
>are there any problems for these?
What does your compiler say? Does it work when you test it? Do you think this is your all purpose debugging with no work forum? At least attempt to figure it out on your own or you'll never learn anything.
-Prelude