|
From: Daniel G. <sp...@ho...> - 2001-11-29 15:56:51
|
<html><div style='background-color:'><DIV>
<P>Dev will pop up then down quickly in short programs because the program has executed, finished, and thus destroyed the window.</P>
<P>What I normally do is add something like cin>>x; that way the computer MUST wait for me to push a button to resume and thus exit the program.</P>
<P>oh and it should be #include <iostream.h></P>
<P> </P>
<P>Hope that helps!<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Jeff Clark" <JA...@SP...>
<DIV></DIV>>To: "Dev-C++ mailing list" <DEV...@LI...>
<DIV></DIV>>Subject: [Dev-C++] Run Problem
<DIV></DIV>>Date: Thu, 29 Nov 2001 07:42:37 -0800
<DIV></DIV>>
<DIV></DIV>>Hello,
<DIV></DIV>>
<DIV></DIV>>I'm new to C++ development; in fact I'm trying to learn by "Sams Teach
<DIV></DIV>>Yourself C++".
<DIV></DIV>>
<DIV></DIV>>I have installed Dev-C++, and have written a test program, the program
<DIV></DIV>>compiles, but when running it, it only flashes quickly on the screen.
<DIV></DIV>>
<DIV></DIV>>My system is a Pentium III with Windows 2000 installed, the program is
<DIV></DIV>>stated below, as it is in the book:
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> #include <IOSTREAM.H>
<DIV></DIV>>
<DIV></DIV>>int main()
<DIV></DIV>>{
<DIV></DIV>>int x = 5;
<DIV></DIV>>int y = 7;
<DIV></DIV>>cout << "\n";
<DIV></DIV>>cout << x + y << " " << x * y;
<DIV></DIV>>cout << "\n";
<DIV></DIV>>return 0;
<DIV></DIV>>}
<DIV></DIV>>
<DIV></DIV>> ????? What am I doing wrong that the program when executed does not stay up
<DIV></DIV>>on the screen????
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Sincerely,
<DIV></DIV>>
<DIV></DIV>>Jeff
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>Dev-cpp-users mailing list
<DIV></DIV>>Dev...@li...
<DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>
|