Menu

Dev C++ Runs only the firs program compiled

jrguay
2007-04-19
2012-09-26
  • jrguay

    jrguay - 2007-04-19

    Hi, I just started with Dev C++ 4.9.9.2 but foud a problem. I made a first program with just a source file, not a project, and then compiled it, ran it, everything went ok. Then I close the program and started a second one, when I finished it, I compiled it, everything where ok, but then the window showed the first program I compiled, and nothing I do can change that.

    By the way, the two programs where console apps.

    Anybody can help me with that?

    Thanks.
    Jose

     
    • Kurgusov

      Kurgusov - 2007-05-13

      k,why not just make a project for all your practice code so its all in one place,then make another project and see if you get the same problem.
      Also,Im new to programming too,but I've never seen the code....
      return system("pause");
      try going...
      system("pause");
      return 0;
      }

      goodluck.

       
    • jrguay

      jrguay - 2007-04-19

      I almost forgot, my OS is Windows XP Home with SP2.

      The first program was:

      include <iostream>

      include <string>

      using namespace std;

      main()
      {
      system("color 0e");
      cout << "Hello world..." << endl;
      return system("pause");
      }


      The second one is:

      include <iostream>

      include <string>

      using namespace std;

      main()
      {
      int i;
      system("color De");
      cout << "Input a number:";
      cin >> i;
      cout << "The number +1 is : " << ++i << endl;
      return system("pause");
      }

       
    • Kurgusov

      Kurgusov - 2007-04-20

      Have u got any additional sheets in that program u did,is it only main() or do u have additional sheets,if I dont save my main() after saving any of my additional associated files even if I dont need to,it wont run with the new changes...is that any help?
      lalala chill,
      Kurgusov.

       
      • jrguay

        jrguay - 2007-05-09

        Thanks zalapkrakna.

        It doesn't help me because I already have saved the programs.

        This two programs are so simple, but I still got the error.

        Thanks any help.

        Jose

         

Log in to post a comment.