avr-gcc-list
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]