Re: beginner question...

From: Andrew Falanga (andy_at_spam.me.not)
Date: 02/03/04


Date: Tue, 3 Feb 2004 10:28:33 -0700

On Mon, 05 Jan 2004 23:06:33 GMT
"Samuel Ackwonu" <samuel.ackwonu@chello.at> wrote:

> I have DJGPP and rhide.It works to compile a program but not to run it. why?
>
> I also have Dev C++. Compiling works too, but when I execute the program a
> DOS-window appears very shortly and finish. Do I have to use delay-command
> or is it something that is wrong?
>
> thx
> samu
>
>

Regarding DJGPP, if memory serves, it only compiles. You, actually have to execute the program. In other words, your source code goes in "source.c" and the compiler spits out "something" that you tell it too. The output file is usually specified on the command line. (I honestly have forgotten with DJGPP. I downloaded it once and used it...like...once. I normally program in UNIX or UNIX like systems, so I'm always using gcc.)

In reference to the second one, this has been asked here a lot. I don't have the FAQ address, but if you do a simple search on groups.google.com for the FAQ you'll find it. If memory serves, at the end of your program you have to put something like this (see code below):

int main(void) {
  // doing stuff
  
  fgetc(stdin); // at the end to pause so you can see
  return 0;
}

HTH,
Andy

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----



Relevant Pages

  • Re: Hashtable
    ... public void AddKeyedValue(string key, int value) { ... Justin Rogers ... Blog: http://weblogs.asp.net/justin_rogers "MAY" wrote in message ... > Thx again. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: weird problem
    ... >> when I calculate it on a calculator ... so the debugger displayed 40 but in reality it ... was rounded off to 39 when casted to int. ... Thx for your reply ...
    (microsoft.public.vc.language)
  • Re: convert a string to all-lowercase string
    ... (I'm a newbye) ... Thx for the help:) ... int main{ ... if(isupper((unsigned char) c)) ...
    (comp.lang.c)
  • Re: conio.h --> window (int left, int top, int right, int bottom)
    ... > thx for the tips Daniel ... > Assume the follow is the layout of a console screen ... > X in the above console screen), I use window(int, int, int, int) method. ...
    (microsoft.public.dotnet.languages.csharp)
  • How to trigger onCreate (COleControl) in Edit-mode PowerPoint
    ... thx. ... Dankung ... MPLEMENT_DYNCREATE(MyCtrl, COleControl) ... int MyCtrl::OnCreate ...
    (microsoft.public.office.developer.automation)