Gnode* Graph::addNode(const char *nodeName)
{
Gnode *p= new Gnode(nodeName);
d_nodes.add(p);
return p;
}
Note that there is a lot of dependence between the classes. We need to talk about constructor methods for the various objects. First, we need to construct a Gnode.