Mail Archives: djgpp/1997/09/16/22:30:57
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 -