Re: Stopping command window from closing

From: Mark P (mot_at_my.real.email)
Date: 02/26/05


Date: Sat, 26 Feb 2005 00:51:34 GMT

Gareth wrote:
> I'm trying to learn c++ with Borland C++ Builder 6.
>
> It seems to be a fairly straightforward program to use using the "console
> wizard" for basic c++ textbook lessons (File>>New>>Other>>Console Wizard).
>
> But why do I need to insert the following line of code in to the source to
> prevent the XP command window from closing?:
>
> std::cin.get();
>
> Why doesn't the window automatically remain open and wait for a closure
> click to close?
>
> Gareth.
>
>

Why don't you open a command window first (Start-Run, cmd) and then run
your program from within it?



Relevant Pages

  • Re: Stopping command window from closing
    ... Gareth: ... > It seems to be a fairly straightforward program to use using the "console ... > prevent the XP command window from closing?: ... What is the most annoying thing on usenet and in e-mail? ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Stopping command window from closing
    ... "Gareth" wrote in ... > source to prevent the XP command window from closing?: ... this solution is not ANSI compliant. ...
    (alt.comp.lang.learn.c-cpp)
  • Fake Console Application
    ... I want to create something that acts like a Command Window where users can enter text and on hitting return some action will be taken depending on the text that was entered. ... I don't want users to be able to cursor all over the console - I want to capture the up/down keys and put previous text in to the console - in fact I want it to pretty well be a command window but with control over what goes into it. ... I have also tried a User Control with a disabled RichTextBox and a Text Box for input at the bottom - control is much better but the user doesn't get the feel that he/she is typing in to a console window. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Can I get both Command Window" and "Win32 Window"
    ... Can I have both win32 and command window, Mingw could do it but it can ... // maximum number of lines the output console should have ... setvbuf(stdout, NULL, _IONBF, 0); ...
    (microsoft.public.vc.language)
  • Re: Command To Output Text To The Screen In .vbs??
    ... It's also worth noting that you should be using cscript.exe to call it if ... you want the messages to write to the console. ... command window. ... and I don't want 50 million popup windows. ...
    (microsoft.public.vb.general.discussion)