Possible Duplicate:
Struct initialization of the C/C++ programming language?
I'm re-learning C and asking myself if something like this is possible:
typedef struct Link {
struct Node a;
struct Node b;
float weight;
} Link;
Link links[LINK_NUMBER];
links[0] = {nodes[0], nodes[1], 5};
instead of:
Link link0 = {nodes[0], nodes[1], 5};
links[0] = link;