www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/16/22:30:57

Date: Tue, 16 Sep 1997 21:30:40 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: ludvig <ludvig AT club-internet DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: Stupid problem
In-Reply-To: <341EFFFF.DE0@club-internet.fr>
Message-ID: <Pine.SUN.3.95.970916212937.11331A-100000@bert.eecs.uic.edu>
MIME-Version: 1.0

On Tue, 16 Sep 1997, ludvig wrote:

> 
> Hi!
> 
> I have just finished the graphic part of my program, so far so well,
> when I encountered a strange problem. I used to program under Borland
> C++ and I have never even heard of such a problem...
> 
> When compiling the program with the lines:
> 
> struct sprite{
> short x,y,d,b;
> }
> 
> sprite actual_sprite;
> 
> The compiler gives me:

just change your definition to:
typedef struct sprite {
   short x, y, d, b;
} sprite;

or the other alternative is when you declare your struct use:
struct sprite actual_sprite;

> 
> Parse error before actual_sprite
> Warning: Data definition has no type or storage class
> 
> Do I have to use a special library to be able to use structs?
> 
> Thanks for reading this:)
> 
> Ludvig
> 
> ps. please e-mail me a copy. <ludvig AT club-internet DOT fr>
> 


                        ,,,
                       (0 0)
   +-------------oOO----(_)-------------------+
   |                Andrew Deren              |  
   |             aderen AT eecs DOT uic DOT edu          |
   | www.eecs.uic.edu/~aderen/ader/main.html  |
   +-------------------------oOO--------------+
                       || ||
                      ooO Ooo
 


- Raw text -


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