I want to set an empty list as a default value to the list argument. I've tried using {}, list.(), NULL, and {NULL} to no avail.
void f(std::list<treeNode*> &path = ??);
When {}
is used,
error: could not convert ‘<brace-enclosed initializer list>()’ from ‘<brace-enclosed initializer list>’ to ‘std::list<treeNode*>&’
When list<treeNode*>()
is used,
error: expected primary-expression before ‘.’ token
void f(treeNode* root, int &n, list<treeNode*> &path = list<treeNode*>.()){