Question on dev-c++

I am a beginner in C++ using Dev-C++ ( version 4.9.9.2). The output screen does not appear upon executing code. It just flashes for a very short burst of time and then closes. But this occurs when there is only output, that is...when there is no need for interface , for example, using the cin operator to make a user-interface type program...the one where the user will have to give values of his/her choice etc. and then the output is presented before the user. The problem does not appear in this type of condition. How to rectify this?
Read Duoas's responses in this topic:
http://www.cplusplus.com/forum/beginner/1988/
Thank you firedraco...did not look into to it before posting my question, must be more watchful.
or, if you don't want to use system("pause");, which could lead to portability issues, try using something like cin.ignore();

Here's an example:

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

using namespace std;

int main () {
	
	cout << "Hello World!\n";
	
	cin.ignore();
	return 0;
}


Hope this helps!
Topic archived. No new replies allowed.