2018-08-20 09:18 AM
Hello All , I am sorry it might be the wrong forum ,
i use STM32f429 with TFT to create a menu system
I am declare a structures for menu but i dont have success to put a structure in side a struture
could me what is wrong ?
struct menu_type
{
char *title;
unsigned char type;
uint16_t rec_xpos;
uint16_t rec_ypos;
uint16_t rec_width;
uint16_t rec_high;
unsigned int num_items ;
char* items [ 100] ;
void (*nag_ok)();
void (*nag_right)();
void (*nag_left)();
void (*command)();
};
//--
struct menu_main
{
struct menu_type submenus;
};
how can I pass the variables to menu_main ?
Thank you all
2018-08-20 10:48 AM
Yes, this is definitely the wrong forum. I'd suggest an introduction-to-C-programming forum to learn the basics of the language.
2018-08-20 11:27 AM
>>how can I pass the variables to menu_main ?
Not even sure what the question is actually asking.
How do you initialize said structure? Is that what you're asking?
Or how to assign values?
foo.submenus.title = "Some Title";
I prefer to use "typedef struct _xyz {} xyz;" form.