why do my programs just flash off the screen when i try to execute them?
i am new to programming, don't forget!

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.
check this:-

int main(){
    char as;
   /*your code.........
.....................
..........................
...........................
............................
*/
    scanf("%c",&as);
    return 0;
}

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.

Edited 5 Years Ago by Moschops: n/a

I am using dev cpp too. I am using version Dev cpp 4.9.9.2. 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:

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    system("PAUSE");
    return EXIT_SUCCESS;
}

where system("PAUSE") function make what you want.

This question has already been answered. Start a new discussion instead.