[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] calling function pointers via pointers ?
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] calling function pointers via pointers ? |
Date: |
Wed, 28 Sep 2005 18:56:55 +0200 |
Thank you so much chaps, after an hour experimenting, armed with all
your suggestion, I have now improved my understanding of pointers
again... and it now works...
However, something still causes me trouble apparently....
The actual/complete declaration of my "menu" data type / structure is :
struct menu {
uint8_t options; //options to control the operation of the menu
uint8_t nb; //number of options present in this menu
char desc[][21]; //table to store the strings for each menu entry
void (*fp[])(void); //table to store the pointers to the functions
};
The compiler complains that :
ui.h:29: error: flexible array member not at end of struct
make: *** [main.o] Error 1
I got around this by giving a fixed size to 'desc', which worked fine
for debugging the pointer part of things, but it's otherwise no good of
course.
What's the trick ?
--
Vince
- [avr-gcc-list] calling function pointers via pointers ?, Vincent Trouilliez, 2005/09/28
- Re: [avr-gcc-list] calling function pointers via pointers ?, Lars Noschinski, 2005/09/28
- Re: [avr-gcc-list] calling function pointers via pointers ?, Thomas Buchta, 2005/09/28
- Re: [avr-gcc-list] calling function pointers via pointers ?,
Vincent Trouilliez <=
- Re: [avr-gcc-list] calling function pointers via pointers ?, Joerg Wunsch, 2005/09/28
- RE: [avr-gcc-list] calling function pointers via pointers ?, stevech, 2005/09/29
- Re: [avr-gcc-list] calling function pointers via pointers ?, Joerg Wunsch, 2005/09/29
- RE: [avr-gcc-list] calling function pointers via pointers ?, Vincent Trouilliez, 2005/09/29
- RE: [avr-gcc-list] calling function pointers via pointers ?, Vincent Trouilliez, 2005/09/29
- Re: [avr-gcc-list] calling function pointers via pointers ?, David Brown, 2005/09/29
- Re: [avr-gcc-list] calling function pointers via pointers ?, Dave Hansen, 2005/09/28
- Re: [avr-gcc-list] calling function pointers via pointers ?, David Brown, 2005/09/29
- Re: [avr-gcc-list] calling function pointers via pointers ?, Vincent Trouilliez, 2005/09/29
- Re: [avr-gcc-list] calling function pointers via pointers ?, David Brown, 2005/09/29