title: Passing a multidimensional vector (matrix) to a Function in C++
body: <p>I am having problems passing a multidimensonal array to a function from main. Here is an example of the problem:</p>
  
  <pre><code>double function(int**);
  int main(){
      vector&lt; vector&lt;int&gt; &gt; my_vec;
      double result;
      result = funtion(my_vec); //it doesnt recognize the type. my vec
      return 0;
  }
  double function(int**my_vec){
      // DOES STUFF WITH THE DATA
  }
  </code></pre>
  
  <p>What is the correct way of passing the matrix to the function?</p>