Hi EveryBody, I am again here with a petty issue................
Please Help me, I am a newly born programmer to MFC
To Write/Read structure on File, I wrote the following code.
/* test is a structure defined in stdafx.h*/
buffWrite .age ="27";
buffWrite .name = "My Name";
f.Open ("E:\\MyFile.bcr", CFile ::modeCreate | CFile ::modeWrite ,&Fexcep);
f.Write (&buffWrite,sizeof(buffWrite ));
if(f.Open("E:\\MyFile.bcr", CFile ::modeRead ,&Fexcep) == FALSE)
f.Read (&buffRead ,sizeof(buffRead ));
The Following Exception occurs when the last statement in code executes.........
Unhandled exception at 0x7c176d3f (mfc71d.dll) in FileOperations.exe: 0xC0000005: Access violation reading location 0xfeeefeee.