At the very end of your main() function, put:
Code:
#include <stdlib.h>
....
system("pause");
return 0;