K
koffee
Hi people,
I've got a question on global structure initialization.
A global variable like int can be explicitly initialized as:
int Global = 1;
But how can I explicitly initialize a self-defined global structure?
like:
typedef mystruct {
int a;
int b;
//...
} Mystruct;
I searched this group and heard that a global variable will be
initialized to zero or NULL implicitly. But what if members in a
global structure needs to be initialized to values other than 0???
Thanks every one!!!
I've got a question on global structure initialization.
A global variable like int can be explicitly initialized as:
int Global = 1;
But how can I explicitly initialize a self-defined global structure?
like:
typedef mystruct {
int a;
int b;
//...
} Mystruct;
I searched this group and heard that a global variable will be
initialized to zero or NULL implicitly. But what if members in a
global structure needs to be initialized to values other than 0???
Thanks every one!!!