Created
October 24, 2018 10:17
-
-
Save SzymonSzott/b0f868597aa18c94b0a0745c0ce05680 to your computer and use it in GitHub Desktop.
[ns-3] Iterate over node container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NodeContainer c; | |
| c.Create (numNodes); | |
| /*...*/ | |
| for(NodeContainer::Iterator n = c.Begin (); n != c.End (); n++) | |
| { | |
| Ptr<Node> object = *n; | |
| uint32_t id = object->GetId(); | |
| std::cout <<"Node Number "<< id << std::endl; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment