[LAD] [ot] programming typedefs...

Fons Adriaensen fons at kokkinizita.net
Thu Jul 10 16:43:00 UTC 2008

On Thu, Jul 10, 2008 at 06:24:29PM +0200, Julien Claassen wrote:

>    But I'mtoo stupid. I have a struct, which contains a pointer to itself as an 
> element. How to write this. I once knew, but now I fail. It's a shame! :-(

This works for me:

#include <stdio.h>

struct XXX
    int         a;
    int         b;
    struct XXX  *p;

int main (void)
    struct XXX   X;

    X.p = &X;

    printf ("%p, %p\n", &X, X.p);

    return 0;


Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !

More information about the Linux-audio-dev mailing list