[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Typdef chick 'n egg situation.. way out ?
From: |
Vincent Trouilliez |
Subject: |
[avr-gcc-list] Typdef chick 'n egg situation.. way out ? |
Date: |
Wed, 21 Jan 2009 16:46:38 +0100 |
Hi list,
Problem: I have two typdef's statement, each type contains a pointer to
the other type ! Hmmm....
typedef TMenuItem struct {
char text[20];
TMenu *ptr;
void (*fptr)();
};
typedef TMenu struct {
uint8_t nb;
char title[20];
TMenuItem items[];
};
I am basically rewriting (following a computer crash..) a program I did
3+ years ago.. all from memory. Back then ISTR some kind soul on here,
sorted me out with something he called "forward declaration"... but I
can't seem to manage to find this particular post in the list archive
sadly.
I think it was a line just saying "TMenu" will be defined further down,
don't worry Mister GCC and just accept my TMenuItem struct below, you
will find TMenu soon enough. Something to that effect ! ;-)
TIA...
Regards,
--
Vince
- [avr-gcc-list] Typdef chick 'n egg situation.. way out ?,
Vincent Trouilliez <=
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, larry barello, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Dean Ferreyra, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Dean Ferreyra, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, larry barello, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Dave Hylands, 2009/01/21
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Schwichtenberg, Knut, 2009/01/22