cin.get();

Whenever I want to stop my program from closing, I put cin.get(); before return 0;

I don't know why, but sometimes it will work and sometimes it won't even allow me to open the program.
try:
1
2
3
cin.get();
cin.ignore();
return 0;

It worked :o thank you!
Topic archived. No new replies allowed.