The compiler says that a variable is rvalue which would be expected to pass as lvalue in the main function. How can we make v lvalue?
void f(std::vector<std::vector<long>>& vv){
...// modify vv
}
int main(){
std::vector<std::vector<long>> v;
f(v);
return 0;
}
Aucun commentaire:
Enregistrer un commentaire