Hi,
I have been getting core dump when closing an ifstream object by calling ObjName.close();
Using this object, i open a file in binary mode, and read data in a fixed pattern, the same pattern in which it was written
Code:
ifstream ifs(dfilename , ios::binary);
if(!(ifs))
{
cout<<"No file with name "<<fname<<" exists!!"<<endl ;
return;
}
ifs.read(num_arr, sizeof(_eN));
_evN = *((int *)(num_arr));
ifs.read(t_eName,101);
ifs.read(&t_fType,1);
ifs.read(num_arr,sizeof(t_NFacs));
t_NumberOfFacs=*((int *)(num_arr));
similarly there are certain more reads in some for loops after which
i close the object :
ifs.close();
the core dump back trace is pointing to ifs.close()
Can you please help me in tracing out this problem.
KK