typedef struct {
int hour;
int min;
int sec;
} counter_t;
And in the code, I'd like to initialize instances of this struct without explicitly initializing each member variable. That is, I'd like to do something like:
counter_t counter;
counter = {10,30,47}; //doesn't work
for 10:30:47
rather than
counter.hour = 10;
counter.min = 30;
counter.sec = 47;
Don't recall syntax for this, and didn't immediately find a way to do this from Googling.
Thanks!