ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/30/02:32:47

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help very basic question,
Date: Sat, 30 Nov 1996 00:30:57 -0800
Organization: Three pounds of chaos and a pinch of salt
Lines: 38
Message-ID: <329FF0C1.90@cs.com>
References: <01bbde7d$42fbd820$0116a5ce AT pentium-133>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp102.cs.com
Mime-Version: 1.0
To: Mike McLean <libolt AT primenet DOT com>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mike McLean wrote:
> 
> I am learning C on my own, with DJGPP 2.01 and RHIDE 1.0 beta 6, how can I
> get this little basic program to work, I am very new to C.
> 
> #include <stdio.h>
> main()
> {
> void delay(100 msec);
> printf("+----------------------");
> 
> }

You are trying to declare delay in your program instead of calling it. 
Please get a good C reference and study how to call functions.  That
program should read:

#include <stdio.h>
#include <dos.h>

int main( void )
{
    delay( 100 );
    printf( "+----------------------" );

    return 0;
}

P.S.:  Eli and DJ, I just looked at the libc reference and the "delay"
entry is missing the #include <dos.h> header.  I'll post a bug report
and a fix in a few minutes.  ;)

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I |        fighteer AT cs DOT com          |
| Proud owner of what might one   |   http://www.cs.com/fighteer    |
| day be a spectacular MUD...     | Plan: To make Bill Gates suffer |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019