0
在我.h
之前,我有我的類與結構:意外預選賽標識常量
class BST
{
public:
struct BinaryNode
{
//variables
BinaryNode& operator=(const BinaryNode node) ;
BinaryNode(SequenceMap i);
~BinaryNode();
BinaryNode(const BinaryNode &otherNode);
};
};
在我.cpp
我實現我的拷貝構造函數:
BST::BinaryNode(const BST::BinaryNode &otherNode)
{
item = otherNode.item;
if(otherNode.left != nullptr)
left = otherNode.left;
else
left = nullptr;
if(otherNode.right != nullptr)
right = otherNode.right;
else
right = nullptr;
}
當編譯,在BST::BinaryNode(const BST::BinaryNode &otherNode)
我有一個意外的限定符id之前const。