Just starting off - not very well!
I have carefully created 'Hello World', saved the result to My Docs, but when I try to see the result the command window opens, immediately closes and I can just see that it is blank.
What am I not doing right?
Using Win7, but the result is the same with my XP (SP3) machine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is the nature of Windows. The program opens a command window, but as soon as the program ends, it closes the window. If you want to keep it open, open the command window manually and then execute the program from inside the command window.
From: Michael [philoctetes@users.sf.net]
Sent: Monday, October 29, 2012 2:55 AM
To: [dev-cpp:discussion]
Subject: [dev-cpp:discussion] Results not shown
Just starting off - not very well!
I have carefully created 'Hello World', saved the result to My Docs, but when I try to see the result the command window opens, immediately closes and I can just see that it is blank.
What am I not doing right?
Using Win7, but the result is the same with my XP (SP3) machine.
Just starting off - not very well!
I have carefully created 'Hello World', saved the result to My Docs, but when I try to see the result the command window opens, immediately closes and I can just see that it is blank.
What am I not doing right?
Using Win7, but the result is the same with my XP (SP3) machine.
It is the nature of Windows. The program opens a command window, but as soon as the program ends, it closes the window. If you want to keep it open, open the command window manually and then execute the program from inside the command window.
From: Michael [philoctetes@users.sf.net]
Sent: Monday, October 29, 2012 2:55 AM
To: [dev-cpp:discussion]
Subject: [dev-cpp:discussion] Results not shown
Just starting off - not very well!
I have carefully created 'Hello World', saved the result to My Docs, but when I try to see the result the command window opens, immediately closes and I can just see that it is blank.
What am I not doing right?
Using Win7, but the result is the same with my XP (SP3) machine.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/dev-cpp/discussion/48211/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/
Hi Michael, here an answer to your problem:
include <iostream>
using namespace std;
int main (int argc, char *argv[])
{
char quit;
<< endl;
cout << "\'Win32 Console\'." << endl;
cout << "Press q to quit " << endl;
cin >> quit;
}
}
Console Programs just close after having done what they should do. So u
need something to keep it open. Like waiting for a key to be pressed.
I hope that helps you. Just forgot my sourceforge login or i would have
posted there.
Have fun
Ramor
Last edit: Ramor 2012-11-10