This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

defining an array of pointers to structure members generates compiler error

espression must have a constant value

i have a static struct variable having struct members and have to access this members on change of a count. so instead of using a switch case statement to load respective struct member (address) into a pointer, i thought of defining a local array of pointers to point struct members.
but i get above error.
I tried to specifically define the struct at address 0xA0000000 of my parallel SDRAM using __attribute__ ((at(0xA0000000)))

how can this be achieved using an array of pointers??

PS: LPC1788 - but dont think the problem is architecture dependent.

Parents Reply Children