The following code compiles and works as expected.
#include void function(std::vector vec, int size=1); int main(){ std::vect
Why do you need second parameter if it based on the first?
void function(std::vector vec ){ size_t size = vec.size(); //code.. return; }
Isn't it easier?