Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Thank you very much, at least now I know what is going on. I knew that those getchar() approaches wouldn't work with this, but I had to try anything, and I wrote it so people don't suggest me something I have already tried. Just one more thing, are you saying that in order to solve this, I will have to prevent program from terminating, or is it just an idea? I'd just like to know whether I should keep looking for an answer or settle with this. Thanks again, for quick and precise answer. Commented Apr 19, 2018 at 14:32
  • It's a fact that as soon as your program terminates, the console window created for it is gone. You could of course try to let visual studio run your program inside CMD /k [command], in this case, CMD will keep running after your program terminated, so the window would stay. I'm not sure this is feasable though ... Commented Apr 19, 2018 at 14:37