This may be a stupid question, but I cannot find much information on the Internet about creating my own default constructors in C ++. It seems to be just a constructor without parameters. However, I tried to create my default constructor as follows:
Tree::Tree() {root = NULL;}
I also tried just:
Tree::Tree() {}
When I try to do this, I get an error:
No instance of the overloaded "Tree :: Tree" function matches the specified type.
I canβt understand what this means.
I create this constructor in a .cpp file. Should I do something in my header file ( .h )?
source share