Stoping VS2005 from closing the damn console window
Steven Schveighoffer
schveiguy at yahoo.com
Thu Apr 9 09:58:21 PDT 2009
On Thu, 09 Apr 2009 12:53:12 -0400, Andrej M. <and.mitrovic at hotmail.com>
wrote:
> I'm trying to get VS 2005 to stop closing the command window when I'm
> running examples from the "Learn to tango with D" book. (I'm using that
> VS plugin from Dsource.org)
>
> I've tried running the examples with and without debugging, but the
> command window still closes down rapidly.
>
> I've even tried using a function to wait for user input.. but that won't
> work either. I've no idea what's going on. Here's a peace of code I've
> tried:
>
> [code]
> import tango.io.Console;
>
> void main()
> {
> Cout ("What is your name? ") ();
> auto name = Cin.get();
>
> Cout ("Hello ") (name).newline;
> }
> [/code]
Try Thread.sleep(3600);
That will sleep for an hour :)
Of course, you'll have to kill it to stop it.
You can also always simply run cmd.exe and run it from the command line.
-Steve
More information about the Digitalmars-d
mailing list