You have to add a line just before the end of main() to stop the program from closing. Most people call getch() or c++ cin.get(), which is just waiting for keyboard entry.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Online 21,947 posts
since Aug 2005