next up previous contents
Next: Some programming recommendations Up: Some basics of object-oriented Previous: General code structure   Contents


Review

The most important information that you hopefully take from the above is that when you copy something like


{}
#include <map>
...
typedef map<int,Node*> Nodes ;
...
Nodes nodes ;
...
Node* node = new Node( ... ); // allocate space for new node
...
from this text, then afterwards the use of this is relatively straightforward:


{} 
cout << "ID:" << nodes[213]->id() << endl ; 
cout << "X :" << nodes[213]->x() << endl ;



2004-02-02