its because output screen is not holding, it's displaying output and goes off..you can use scanf("%c",&hold); before return 0 to hold the screen.
and carefull don't forget to declare hold variable as char.
The question is actually why wouldn't your programmes disappear when they're finished? What are you doing to keep them visible? Nothing.
Your programme is a console programme; when you run it, a console is brought into existence. When the programme finishes, the console closes. If you open a console yourself first and then run the programme from that command line, the console will remain when the programme finishes.
Additionally, you're not doing yourself any favours using Dev-C++, especially now that C++ 11 is out.
I am using dev cpp too. I am using version Dev cpp 184.108.40.206. 2nd posibility (after launch straight from console)you can do is (mean in my version) that you have to, when you want to create some console application, follow this: File/New/Project, there select console application and create it. Then you have to save it (sooner or later during compilation). Source code look like this or similar:
using namespace std;
int main(int argc, char *argv)
where system("PAUSE") function make what you want.
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...