|
From: Jason H. <jas...@bt...> - 2001-12-01 22:51:35
|
I only used it because it because it's quick, simple and gets the job done
with only one line of code. In other words I'm lazy. I agree it's not
portable, although it should work with your average Dev-C++ installation. In
most cases portability isn't an issue as I think most people use it only for
test programs.
Jason.
----- Original Message -----
From: "Charles" <cha...@at...>
To: "christiaan scholtz" <ck...@ia...>;
<dev...@li...>
Sent: Saturday, December 01, 2001 7:03 PM
Subject: Re: [Dev-C++] Run Problem
> Christiaan -
>
> > whats wrong with pause?
> >
> > > Note that Jason's solution,
> > > > If you add #include <cstdlib> at the top and the line:
system("PAUSE")
> > > is system-specific and therefore not portable.
> > >
> > > It is better to do this:
> > >
> > > #include <cstdio>
> > >
> > > printf("Press ENTER to continue");
> > > fflush(stdout);
> > > getchar();
>
> When I say that it is not portable I mean that "pause" will not work on
all
> systems. I found this out recently because I have used it too. I made
some
> changes to my computer (installed Windows 98SE, switched to the Cygwin
> compiler etc.). Now system("pause") will not work for me.
>
> Code portability is a good thing.
>
> Chuck
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|