Re: Stopping command window from closing
From: Chris Schumacher (kensu___at_hotmail.com)
Date: Fri, 25 Feb 2005 04:11:05 GMT
"Gareth" <email@example.com> wrote in
> 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?:
> Why doesn't the window automatically remain open and wait for a
> closure click to close?
You need it to pause before the window closes. C++ is meant to be run
from a command prompt.
For windows the line is: system("pause");
I don't know what it'd be on a Unix system.
obAnsi: this solution is not ANSI compliant.