Expected primary expression?
Hey, I have a question - I am getting this compiler error:
Code:
20 main.cpp expected primary-expression before "void"
When I call:
Code:
best tree;
tree = new bst(void);
bst.h
Code:
[clip]class bst
{
public:
//------------------------------------------------------------
// Default constructor, creates an empty BST
//------------------------------------------------------------
bst(void);
[clip]
bst.cpp
Code:
bst::bst(void)
{
NodePool myNodePool;
}
I tried calling the function like:
Code:
bst tree;
tree = new bst();
but that gave me this error:
Code:
20 main.cpp no match for 'operator=' in 'tree = (((bst*)operator new(1u)), (<anonymous>->bst::bst(), <anonymous>))'
Any help?