In C++, I want to have a function that takes an optional argument of type vector. If the argument is not provided, I want the variable to have size 0. I currently have
void v_connect::import(vector<int> vid_,vector<double> vpos_,vector<int> vbd_,vector<int> bd_ss_=std::vector<int>() )
But this doesn't work. Basically, if the user provides the optional argument bd_ss_
I want to do a check bd_ss_.size()!=0
and then do some extra stuff. If the user does not provide the argument, I want bd_ss.size()==0
. Is this possible?