c++ - Program crashes on exit

I created a program called Stress-Tables, it works OK until it exists, then
it gives the following error message
STRESS-TABLES executed an invalid instruction in
module <unknown> at 0000:0000054f.
leaving the dos window open, when the window is closed manually the computer
appears to have suffered no ill effects. The last command in the program
was a printf statement, which appears to have worked OK. If you close the
dos window by clicking the cross, the program shuts down OK. The program is
520KB in size, most of that is data. When the program was being developed
it worked fine, but as it got bigger this problem started to occur.
Many Thanks
John

I suspect that somewhere in the program, a malloc or new is being done, and
the result is not checked for NULL. It's also possible you're having a stack
overflow (too much recursion). What I strongly suggest is porting the
program to Win32, thoroughly test/debug it there, and then back port it to
DOS.
-Walter
"John Dyson" <post gowelding.com> wrote in message
news:au4nme$1dim$1 digitaldaemon.com...

I created a program called Stress-Tables, it works OK until it exists,

it gives the following error message
STRESS-TABLES executed an invalid instruction in
module <unknown> at 0000:0000054f.
leaving the dos window open, when the window is closed manually the

appears to have suffered no ill effects. The last command in the program
was a printf statement, which appears to have worked OK. If you close the
dos window by clicking the cross, the program shuts down OK. The program

520KB in size, most of that is data. When the program was being developed
it worked fine, but as it got bigger this problem started to occur.
Many Thanks
John