Menu

Can't run program.

DTO
2009-08-07
2012-09-26
  • DTO

    DTO - 2009-08-07

    Okay, I'm in the process of learning C++ and all that, so this might sound like a really basic question.

    I just compiled this program here, and there aren't apparently any errors, but whenever I try to run the thing, nothing happens.
    At all.

    Any suggestions?

     
    • cpns

      cpns - 2009-08-08

      > Any suggestions?

      Yes! Read the prominently titled "PLEASE READ BEFORE POSTING A QUESTION" thread in this very forum.

      As well as telling how to post a question in a manner that we might have a hope of answering, it also has information on common problems encountered by users, and yours sounds like number (2) in the list (which incidentally starts from zero - I guess programmer's humour!).

      A clue: In normal circumstances (i.e. you will have observed it in every program you have ever run on your computer), when a program runs to completion and terminates, what do you think the OS does with its window? Programs you write yourself are no different in this respect. I program that runs and completes in a few milliseconds will appear to do little or nothing.

      Your problem may of course be something else, which is where the first part of the read-first thread comes in.

      Clifford

       
    • Sipuracku

      Sipuracku - 2009-08-08

      Hi !
      my problem is next:
      after i putt a missing threads for graphics and when i compile a simple stuff like :

      include <cstdlib>

      include <iostream>

      include <winbgim.h>

      using namespace std;

      int main()
      {
      int gdriver = 9;
      int gmode = 2;
      initgraph(&gdriver,&gmode,"");
      setbkcolor(WHITE);
      setcolor(BLACK);
      cleardevice();
      circle(320,240,180);
      getch();
      closegraph();
      return 0;
      }

      an error is occurs: 12 C:\radni\projekt1.cpp WHITE' undeclared (first use this function) 13 C:\radni\projekt1.cppBLACK' undeclared (first use this function)
      C:\radni\Makefile.win [Build Error] [projekt1.o] Error 1

       
      • cpns

        cpns - 2009-08-08

        This post is not an answer to the originator's problem, and is not a related problem. Start your own thread; don't hijack other peoples threads!

        On top of that you also failed to post the complete compile log so presumably you too have not read the " PLEASE READ BEFORE POSTING A QUESTION" thread.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.