www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/08/04:49:46

From: "cywu" <cywu AT iii DOT org DOT tw>
Newsgroups: comp.os.msdos.djgpp
Subject: Forward reference....
Date: 8 Nov 1999 08:51:07 GMT
Organization: SEEDNet News Service
Lines: 26
Message-ID: <8062tr$b6m$1@news.seed.net.tw>
NNTP-Posting-Host: 140.92.12.113
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Source code in xxx.h are as following:

/* Forward reference of OsTimer. This is so it can be used in the
declaration
 * of OsTimerNotify
 */
  93  typedef struct _OsTimer OsTimer;
        typedef void (*OsTimerNotify)(OsTimer*);
        typedef struct _OsTimer {
          ListEntry        node;
          TimeT            time;    /* Time period of the timer in TimeT
units */
          OsTimerNotify    func;    /* Pointer to function called when timer
fires */
          TimeT            startTime;
100     } OsTimer;
but after compile, the error message is:
    xxx.h:100: redefinition of 'OsTimer'
    xxx.h:93: 'OsTimer' previously declare here

            why, thank a lot.......

cywu



- Raw text -


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