pass vector by reference c++

C++
void func(vector<int> &vect) 
{ 
   vect.push_back(30); 
} 
Source

Also in C++: