title: Declaring variable sized array without using dynamic memory allocation
body: <p>I want to allocate variable sized 2D array in a function without using new operator such that this 2D array is available to other functions in the same file.</p>
  
  <pre><code>    void draw(int i)
      {   size=i;   }
  
      void assign(char symbol)
      {
          char one[size][size];
          /// ... Assigning values to one  ...
      }
      void display()
      {   /// Displaying values of one[size][size]
          for(int i=0;i&lt;size;i++)
          {
              for(int j=0;j&lt;size;j++)
              cout&lt;&lt;one[i][j];
              cout&lt;&lt;endl;
          }
      }
  </code></pre>
  
  <p>Execution order of functions is draw -> assign -> display</p>
  
  <p>This question may have been asked earlier. 
  But my problem is..
  -> I can't declare the array outside assign function globally because value of size is not known.
  -> I can't use "one" array in "display" function because its scope is limited to "assign" function.</p>
  
  <p>And I also don't want to use either new or malloc operators.
  Please help if there is any alternative available.</p>