When i compile my code i keep getting an error. *** glibc detected *** ./main: free(): invalid pointer: 0xbfb82c34 *** . I can not figure out for the life of me what the issue is. I think it may have something to do with my constructor. Any suggestions would be appreciated.
Employee* Earray[10]; // Declared as private member of payroll
Payroll::Payroll()
{
Employee **EmpPointer;
EmpPointer = new Employee*[10];
for ( int i = 0; i < 10; i++ )
{
Earray[i] = 0;
}
}
Payroll::~Payroll()
{
delete [] Earray;
}