I want to set my function with class object parameter set as default. But when I try to do that it fails in compilation.
class base { // ... }; int myfunc(
Objects can't be NULL in C++.
NULL
To set the parameter to default, just use:
int myfunc(int a, base b = base())