In the following snippet of code, what is the significance of the colon ( : ) after Tree::Tree() and after Tree::Tree(Node const &node)? Is it supposed to mean that Tree::Tree() inherits from left(0), or the two subtrees and the node?
Code:#include "tree.h" //default constructor: initializes to 0 Tree::Tree() : // what does this colon signify? left(0), right(0), node(0) { } // Node constructor: adda Node object Tree::Tree(Node const &node) : //what does this colon mean? left(0), right(0), node(node.clone()) { }



LinkBack URL
About LinkBacks



CornedBee