M
Martin Magnusson
I have an abstract class MaxNode with a single constructor looking like
this:
MaxNode( std::string name = "NN" );
The class MaxLeaf is derived from MaxNode, and doesn't define any
explicit constructor of its own.
Now shouldn't it be possible to declare something like this:
MaxLeaf* north = new MaxLeaf( "North" );
g++ tells me that there is no matching function for call to
`MaxLeaf::MaxLeaf(const char[6])'
candidates are: MaxLeaf::MaxLeaf()
MaxLeaf::MaxLeaf(const MaxLeaf&)
What am I doing wrong?
/ martin
this:
MaxNode( std::string name = "NN" );
The class MaxLeaf is derived from MaxNode, and doesn't define any
explicit constructor of its own.
Now shouldn't it be possible to declare something like this:
MaxLeaf* north = new MaxLeaf( "North" );
g++ tells me that there is no matching function for call to
`MaxLeaf::MaxLeaf(const char[6])'
candidates are: MaxLeaf::MaxLeaf()
MaxLeaf::MaxLeaf(const MaxLeaf&)
What am I doing wrong?
/ martin