-3

How do stop the console window from closing after there has been a error when running a .exe?

I am keeping the window open with _ <- getLine but this of course only works if the program runs up to that point.

leftaroundabout
  • 111,176
  • 4
  • 161
  • 301
matt
  • 1,543
  • 9
  • 27
  • This seems to be mainly a question about Windows and its... well, if you want to call that a terminal... ...anyway, it would be a good idea to add what particular version and so on. – leftaroundabout Jul 03 '16 at 00:05

1 Answers1

2

If you are asking how to keep the console window opened when invoked from a short cut, try invoking the program with cmd.exe /k ...

See, for instance: How do you keep the console from closing after the program is done in C?

Community
  • 1
  • 1
ErikR
  • 50,987
  • 8
  • 69
  • 122