I got to add some C code to my qt object n it's important not to change the C code at all.
qt notifies the following error:
error: invalid conversion from ‘int’ to ‘InitializationState’
when the C code tries to OR an element of the enum type with it's variable.
Here's the description:
enum InitializationState {
INIT_NO_ONE = 0x00,
INIT_NO_TWO = 0x01,
INIT_NO_THREE = 0x02,
INIT_NO_FOUR = 0x04
};
typedef enum InitializationState InitializationState_t;
InitializationState_t InitState = INIT_NO_ONE;
enum InitializationState {
INIT_NO_ONE = 0x00,
INIT_NO_TWO = 0x01,
INIT_NO_THREE = 0x02,
INIT_NO_FOUR = 0x04
};
typedef enum InitializationState InitializationState_t;
InitializationState_t InitState = INIT_NO_ONE;
To copy to clipboard, switch view to plain text mode
the errors I receive pop up one by one whenever I try to OR:
InitState |= INIT_NO_ONE;
InitState |= INIT_NO_ONE;
To copy to clipboard, switch view to plain text mode
I also tried accessing the elements of enum using . sign, though it failed.
any helps would be appreciable : )
Bookmarks