I am trying to allocate an array of structs within a struct. Here is my code:
struct t_nd {
double stuff;
};
struct t_nwork {
struct t_nd *nds;
};
struct t_nwork net;
// need to allocate the nds array to be of size 10
tried this but failed:
t_nd* net.nds = new t_nd[10];
someone said try a vector, so I tried:
vector<t_node> net.nodes(10);
but yet again failed dismally.