Unhandled exception in file read
I am writing a C program which accesses file. I am using Visual studion 2008. I use fscanf_s to read the file. The file reading happens properly until one step where i get an error which says
Unhandled exception at 0x778d7dd2 in aca.exe: 0xC0000005: Access violation writing location 0x00000028.
I tried step by step debugger and found that the error was in
fscanf_s(f1,"%x %d %d %d %d\n",&address,&function_unit,&dest,&src1,&src2);
It works till a point from where i get the above exception. The code works fine in linux. But I need VS2008 to execute it. Please help.