Multidimensional variable length array in C++ : <pre><code>void drawTable(int arg[], int length);

int main()
{
    int length=0;
    int counter=0;
    int *pointer2ArrSize = new int[length];

    cout &lt;&lt; "Enter length of array: " &lt;&lt; endl;
    cin &gt;&gt; length;

    do{
            for(int j=0; j&lt;length; j++){
                cout &lt;&lt; "Enter array elements: \n";
                cin &gt;&gt; pointer2ArrSize[j];
                cout &lt;&lt; "You entered: " &lt;&lt; pointer2ArrSize[j] &lt;&lt; " in position: "
                     &lt;&lt; j+1
                     &lt;&lt; endl; 
            counter++;
            }
           cout &lt;&lt; drawTable(pointer2ArrSize[j],length) &lt;&lt; endl;
    }while(!counter == length);

    return 0;
}

void drawTable(int arg[], int length){
    for(int i=0; i&lt;length; i++){
        cout &lt;&lt; arg[i] &lt;&lt; " ";
        cout &lt;&lt; '/n';
    }
}
</code></pre>

<blockquote>
  <p>error: invalid conversion from 'int' to 'int*' [-fpermissive] </p>
</blockquote>

<p>My goal is to display a 2D variable length array. I want the user to define the length of the array and the elements in it. However, am not too familiar with vectors yet. how could I approach this?</p>
