Original Post
Upon saving a file, in my MFC document/view project, I recieve a Microsoft Visual C++ runtime error: "This application has requested the Runtime to terminate it in an unusual way [etc.]" This only happens in the release build. Using a series of message boxes, I found that the error occurs the first time I attempt to write data to the file. Now a lil' background: All my serialization functions are written with my own serializer class, using the std::ofstream class. Because of this, in the CDocument::OnFileSave() function, I simply set a global boolean to 'TRUE', causing my own save() function to be called during the CWinApp::OnIdle() function. This works perfectly in the Debug build, but when I try and save my file in the Release version, it gives me a runtime error. I don't know if my method for saving has anything to do with the error. I am using Microsoft Visual C++ 6 Every time I build an MFC project in release mode, strange things seem to happen. Any help or advice would be greatly appreciated. Thank you.