I am casting a vector pointer as a void pointer to a function. In that function, how to I cast it to a vector pointer?
in main
vector<int *> foo;
function(&foo);
in function
function(void *bar){
auto temp = bar; // what replaces auto or what should bar be cast to?
temp.pushback(something);
}
I hope I have not mangled the terminology, any opinion helps!
Aucun commentaire:
Enregistrer un commentaire