|
From: Johannes P. <joh...@pr...> - 2001-09-06 07:54:41
|
Lo there
------------
to start of you can get this answer at the DevC++ webpage in the FAQ
section. Secondaly
if you create a SIMPLE Dos ap from scratch you will see that it puts in a
template of code that has a
PAUSe line in it example :
//SNIP
#include <iostream.h>
#include <stdlib.h>
int main()
{
system("PAUSE");
return 0;
}
//END SNIP
this will pause the console window that comes up until you press enter or
soemthing.
This is a drag I must admit but is not a big problem really.
I hope it helps and I hope I understood correctly your problem
Johannes
At 07:33 06/09/2001 +0000, you wrote:
>Hi, I am having problems when I try to execute my programs.
>
>To start off, I am writing basic Console Applications. This is a basic
>application that I am trying to get to work.
>
>***********************************************
>
>#include <stdio.h>
>#include <iostream.h>
>
>int main(int argc, char *argv[])
>{
>int Age;
>
>cout << "What is your age?\n";
>cin >> Age;
>cout << "Your age is " << Age << " .\n";
>
> return 0;
>}
>
> Well, as you can see, I ask the user to imput their age. Then as
> soon as they do and press enter, you can see it display the cout string
> that tells them their age, but it only displays it for a second and then
> the window closes.
> My question was, is there a tag that I can add to keep it from
> closing the window immediatly? I am not sure if it just a bug, or I just
> have a missing string. But the reason I am confused is because I am
> taking a programming course at college, and we use Microsoft Visual
> C++. The only difference that I see is instead of the <stdio.h> tag at
> the top of the program, we use <stdafx.h>. Could this have anything to
> do with it, or is there just another string that this program uses that
> makes it finish answering the question and not just immediatly terminate
> the program.
>
>Any feedback you could give me would be greatly appreciative.
>Thank You,
>
>Brian Crabtree
>Reidsville NC
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|