sizeof array of structure
Hi,
I cannot get sizeof structure array.
typedef struct{
uint16_t * registerType;
uint16_t * ptrU16; //r+w to same pointer
uint16_t (*mbReadFuncPtr
uint16_t (*mbWriteFuncPt
uint8_t orderOfRegister;
}ST_MODBUS_
const ST_MODBUS_
{RW_U16_PTR_VAL,
(uint16_t *)&ulPar1 + 1,
rwDummyFunc,
rwDummyFunc,
START_
{RW_U16_PTR_VAL,
((uint16_t *)&ulPar1),
rwDummyFunc,
rwDummyFunc,
END_OF_
{LAST_
};
void getSize(void){
uint16_t sizeOfHoldingRe
}
Above sizeof operand causes this error:
invalid application of 'sizeof' to incomplete type 'const ST_MODBUS_
I couldn't find any solution. Could you please help?
I am using 2016q2 version of compiler for STM32F030 programming with Coocox software.
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- yilmaz eyidogan
- Solved:
- Last query:
- Last reply: