Thomas,
I implemented a global array (actually, vector) three years ago. I
cannot tell if everything still works, especially with respect to what
you need, but here are some snippets:
In the .h-file:
static std::vector<someStruct> allNodes
Where the struct contains some data, in my case positions.
In the .cc-file, right under Define_Module:
#include<vector>
std::vector<someStruct> myClassName::allNodes;
And accessing it:
std::vector<someStruct>::iterator it;
for (it=allNodes.begin();it<allNodes.end();it++){
// do something with it.
}
I hope I didn't forget anything. Maybe this helps.
Kind regards,
Erik Becker
Am 13.12.2013 15:55, schrieb Thomas Ridremont:
> Hello everybody,
>
> I am trying at the moment to implement a network showing how
> *Dijkstra's algorithm* work.
> --
> You received this message because you are subscribed to the Google
> Groups "omnetpp" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
omnetpp+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.