title: How to change vector to a regular array?
body: <p>I have a working function that changes an integer to an array of a vector.
  I want to change it to a regular array without a vector.</p>
  
  <p>the array will be multidimensional</p>
  
  <pre><code>int a = 12345;
  
  int v[4][4]
  {
      { 0,0,0,0 },
      { 0,0,0,0 },
      { 0,0,0,0 },
      { 0,0,0,0 }
  };
  
  int main()
  {
      getArray(a, v[2]);
  
      cout &lt;&lt; v[0] &lt;&lt; v[1] &lt;&lt; v[2] &lt;&lt; v[3] &lt;&lt; v[4] &lt;&lt; " ";
  }
  </code></pre>
  
  <p>This is what I have now but it only works with the vector</p>
  
  <pre><code>template &lt;typename T1, typename T2&gt;
  void getArray(T1&amp; setData, T2&amp; getArray)
  {
      for (; setData &gt; 0;)
      {
          getArray.emplace(getArray.begin(), setData % 10);
          setData /= 10;
      }
  }
  
  int a = 12345;
  
  int main()
  {
      vector&lt;int&gt; v;
      getArray(a, v);
  
      cout &lt;&lt; v[0] &lt;&lt; v[1] &lt;&lt; v[2] &lt;&lt; v[3] &lt;&lt; v[4] &lt;&lt; " ";
  
      system("pause");
  }
  </code></pre>