delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/09/01:41:43

From: twidler AT aol DOT com (Twidler)
Newsgroups: comp.os.msdos.djgpp
Subject: structures
Lines: 22
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news AT aol DOT com
Date: 9 Oct 1998 05:08:58 GMT
Organization: AOL Canada http://www.aol.ca
Message-ID: <19981009010858.09176.00008713@ng141.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Does DJGPP support structures.  How about procedures in structures?

I tried this in DJGPP:

typedef struct NICEDOGY
    {
    int x, y;
    int w h;
    
    int Draw_It()
        {
        x=w;
        y=h;
        }
    }NICEDOGY;

and it didnt work...it gave me some errors at the Draw_It() procedure.
what is going on here?  How do I fix this without putting the Draw_It()
procedure outside of the structure?

Twidler

- Raw text -


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