delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/13/02:07:36

Message-Id: <199710130605.TAA20415@fep1-orange.clear.net.nz>
From: "Jamie Love" <jamie DOT love AT clear DOT net DOT nz>
To: <djgpp AT delorie DOT com>
Subject: Difference between struct setups
Date: Tue, 14 Oct 1997 07:02:46 +1300
MIME-Version: 1.0

Hi,
during my forays into the allegro code, i noticed that structs are set up
like:

typedef struct X
 {
    .....
 } X;
...
X x;

Now, when i was programming in borlands compiler, i just went:

struct X
 {
   .....
 };
...
X x;

So, what is the difference??

I have trouble also understanding why i couldn't use the second setup in my
c code in a small test program i made (it gave me many errors) while in
another program i could go:

struct X
 {
   .....
 }y;

why??

does anyone understand this or am i missing something?

J Love

- Raw text -


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