I have to guess because you did not show us the exact error message. But "exception 13" may be a General protection fault - Wikipedia, the free encyclopedia
The most common reason for these exception are memory access errors (access violations). So check your code if you pass an invalid pointer somewhere or access an array out of bounds (e.g. writing beyond the size of the array).
I (and others here) can't do that beacuse you did not show the declarations for your variables (we did not know for example the sizes of your string buffers and the type of your
Note that the last point (your
class) may be the reason because you are reading the data from file. This won't work if the class contains non-integral members (e.g. pointers to objects, allocated memory, or any other classes that behave similar).
I know that you are a beginner but even for a beginner the code is ugly:
- You are mixing C and C++ IO methods (getXXX functions and streams)
- You are using
- You have large blocks of code inside a
- You did not check if opening the file was successful