void abc(std::vector >& vec1){ std::vector > tmpvec; vec1 = tmpvec; } int main(){ std::vector > myvec; abc(myvec); return 0; }