My program works until I read a file and then if I do anything it makes a message pop up that says "Unhandled exception at 0x009622cf in Read_Write.exe: 0xC0000005: Access violation reading location 0x6c654839."
I can't find what the problem is. My teacher gave me most of the program I just put the reading part and the writing part together.
The output file contains 450 characters. The program attempts to read this into an array of 10 characters. Something has to give. In this case, modifying memory areas outside the array boundaries results in corruption of data with unpredictable (but very bad) results.