-2

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
  • 117,950
  • 5
  • 174
  • 319
matt
  • 1,817
  • 14
  • 35
  • 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
  • 51,541
  • 9
  • 73
  • 124