Are you added in the main()? ----> system("pause") for not close directly the windows console when user make nothing.
View entire thread