I have two pointer variables (prevGuiMsg and currGuiMsg) to a struct inside another struct definition in a C++ source-file:
typedef struct
{
bool re_pop_required;
bool concurrent_popups;
MlGuiMsg* prevGuiMsg;
MlGuiMsg* currGuiMsg;
uint32_t first_popup;
uint32_t second_popup;
}RePopup;
The M1GuiMsg-struct is defined inside a different C header-file (I'm mixing C and C++ code). A pointer to the struct is passed as an argument to a function in the source file, where I wish to store the data that the parameter points to in the pointer variables prevGuiMsg and currGuiMsg.
I wish to explicitly declare a variable of the type struct RePopup and initialize its members along with the declaration in the C++ source file:
RePopup rp = {false, false, 0, 0, 0, 0};
My question is therefore: can/should one initialize a pointer to a struct with zero inside the explicit declaration of another struct?