Using normal C arrays I'd do something like that:
void do_something(int el, int **arr)
{
*arr[0] = el;
// do something else
}
Now, I want to replace standard array with vector, and achieve the same results here:
void do_something(int el, std::vector<int> **arr)
{
*arr.push_front(el); // this is what the function above does
}
But it displays "expression must have class type". How to do this properly?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…