www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/01/06:27:02

From: Mark Augustyn <augustyn DOT 3 AT osu DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: struct in DJGPP
Date: Sun, 31 Aug 1997 20:24:05 -0400
Organization: The Ohio State University
Lines: 28
Message-ID: <340A0B24.55B6E7F7@osu.edu>
NNTP-Posting-Host: ts25-2.homenet.ohio-state.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I hate to ask a dumb question but is this the appropriate way to declare
a struct:

struct cell {
 int terrain;
 BITMAP *tile;
};

It seems simple enough, however, I get the following error when I
declare a variable to be of type cell:
Line 16:
    cell map;

test4.c:16: `cell' undeclared (first use this function)

If I substitute class for struct I get the following as well:
test4.c:7: parse error before `cell'
test4.c:7: syntax error before `{'
test4.c:10: parse error before `}'

What am I missing?  Do I need to include something to use structs and
classes?

Please help before I seriously injure the wall with my head.
Mark.



- Raw text -


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