okay so my program is about Little Alchemy. I have made the game actually. Four different classes. Earth, Water, Fire and Air. which combine to form more elements and further combine to form more elements. Now my problem is related to file handling. I am discussing here just my water class. Though the combinations are not complete but still it'll give you all an idea. I have made function for not repeating any element while storing in the file. (Using Sequential) Now if i keep on adding water and water as input, it gives me sea. Without displaying, if a keep on adding water and any other element in a row. At a specific point, it throws an exception on access reading violation. In water class, it's after five elements i guess while in other after three it crashes. However if I make random elements and also keep on displaying them after few elements, the program runs fine but even then, randomly at any point it again crashes. Like I don't know why it crashes and what the point for abnormal termination. If there is anything different, it's in the alreadyExists function.
Kindly go through the code very carefully. I hope you'll get it what i am trying to say. Like it is totally going random. Suddenly it crashes and when i keep on adding elements in a row, it crashes at any random point. What should I do!