title: Declare struct with use of command line arguments
body: <p>I'm trying to obtain a certain value from a command line arguments. Then using this value I will set the size of an integer array inside my struct.</p>
  
  <p>My code:</p>
  
  <pre><code>int main( int argc, char* argv[])
  {
      int size_of_heap = atoi(argv[1]);
  
  
      struct s_status
      {
          int block_size[size_of_heap];
          char status[size_of_heap];
      }; 
  </code></pre>
  
  <p>It gives me errors of "Invalid declaration of variable-length array".</p>
  
  <p>I don't understand why it doesn't work, because size_of_heap should now be an integer after being converted from a string by atoi(), so block_size[size_of_heap] should be the same as having block_size[any number].</p>
  
  <p>Thanks in advance</p>