just write a system "pause"; sentence before return 0, or execute the
program from a Command Window, so you will see the output after the =
program
termination.
=20
Best,
=20
Jes=FAs
_____ =20
De: dev...@li...
[mailto:dev...@li...] En nombre de feng yu
Enviado el: Lunes, 19 de Julio de 2004 9:09
Para: dev...@li...
Asunto: [Dev-C++] why does this happen?
Hi,
=20
I began using Dev C++ compiler a few days ago. Below is a problem I met.
=20
I write a very simple program as the following:
=20
#include <iostream>
using namespace std;
int main()
{
int numberOfLanguages;
cout<<"Hello reader.\n"
<<"Welcome to C++.\n";
=20
cout<<"How many programing languages have you used?";
cin>>numberOfLanguages;
=20
if (numberOfLanguages<1)
cout<<"Read the preface. You may prefer\n"
<<"a more elementary book by the same author.\n";
=20
else
cout<<"Enjoy the book.\n";
=20
return 0;
}
=20
There is no problem in compilation but when I execute the program, and =
input
a number for "numberOfLanguages", the pop-up screen disappears. I mean =
all
the interactive information I got when executing the program disappears
unexpectedly. But there is no such problem when I use Microsoft Visual =
C++
6.0.=20
=20
I appreciate your patient help.
=20
A programming beginner
_____ =20
Do you Yahoo!?
Vote for the =
<http://advision.webevents.yahoo.com/yahoo/votelifeengine/>
stars of Yahoo!'s next ad campaign!
|