2007/10/2, Juanval <[EMAIL PROTECTED]>:
> Hi there,
>
> I'm revamping my C coding skills (in my university they just teach C++
> and Java, and I had to learn proper C on my own :-S), and I'm reading
> the dwm 4.3 as an exercise, as it seems a very elegantly written piece
> of code.
>
> And I was wondering why is Client defined this way:
> ------------------------------------
> typedef struct Client Client;
> struct Client {
>     [...]
> };
> ------------------------------------
> Instead of doing it the same way as, for example, DC:
> ------------------------------------
> typedef struct {
>     [...]
> } DC;
> ------------------------------------
>
> Are there any functional differences I am missing? To me, they look
> like they do basically the same thing... :-S
>

If you don't have the typedef before the struct Client declaration,
you will have an error because there is a client member (Client *next)
inside the Client structure.
btw: you could have a look at c-faq.com and comp.lang.c for these questions.


-- 


- yiyus || JGL .

Reply via email to