|
Initializing a structure to Zero
Hi,
this particular question has been bugging me
I have a struct (small instance so not using code brackets )
struct random {
int a;
int b;
}example;
What i am trying is
example={0,0};
and it gives an error
Can someone help me how to initialize all the entries within a struct to zero?
In the above example i have used integers but what if they are some other data structure for example another structure?
many thanks!
cheers!
|