It's more than likely because you've got the statement "FIRE". lol jk
If you're using a Windows operating system (OS), then before the "return 0;" line, put "system("pause");" that way it doesn't close right away, and will require you to push a key to close the window.
If it still doesn't work, have the directive "#include <stdlib.h>".