why we cannot perform this operation in vector : When we passing vector in function why we cant do it like an array for example.
  

       
             #include<bits/stdc++.h> 
                using namespace std; 


          void func(vector<int> vect) 
          { 
          vect.push_back(30); 
           } 

           int main() 
           { 
	        vector<int> vect; 
	       vect.push_back(10); 
	       vect.push_back(20); 

	      func(vect); 

      for (int i=0; i<vect.size(); i++) 
	      cout << vect[i] << " "; 

	       return 0; 
        } 
In this example, it works fine.
But if I do it like this why it doesn't work like array.
       
              #include<bits/stdc++.h> 
                using namespace std; 


          void func(vector<int> *vect) 
          { 
          vect.push_back(30); 
           } 

           int main() 
           { 
	        vector<int> vect; 
	       vect.push_back(10); 
	       vect.push_back(20); 

	      func(&vect[0]); 

      for (int i=0; i<vect.size(); i++) 
	      cout << vect[i] << " "; 

	       return 0; 
        } 
  Just like array why this is not possible.