I am doing an exercise from Stroustrup's book. It is the drill from chapter 10 on input and output streams. The program I wrote compiles but crashes when it reaches the prompt for the output file name. My IDE (VC++ Express) simply says there is an unhandled exception yielding a runtime_error at a memory location. Clearly there is a problem with opening the output file stream but I have no idea what it could be. Help is very much appreciated.
Nobody has yet replied to my question. My question was solved on another forum. I needed to clear the cin function before entering the output name on line 30. And "cout" needed to be changed to "ost" on line 35.