title: Defining Cache Size on User's Input
body: <p>I have using the following code to set the Cache Size according to the User's Input</p>
  
  <pre><code>int size=1024;
  Console::WriteLine("Select the Cache Size.\n a. 1 Kb \n b. 2 Kb \n c. 4 Kb \n d. 8 Kb\n");
      String^ CACHE_SIZEoption = Console::ReadLine();
      //Char wh=CACHE_SIZEoption-&gt;ToChar();
  
  
      switch(CACHE_SIZEoption[0])
      {case 'a':{
          size= 1024;
          break;}
  
      case 'b':{
          size=2048;
          break;}
  
      case 'c':{size= 4096;
          break;}
  
      case 'd':{size=8192;
          break;}
      default: {Console::WriteLine("Wrong Input");}
  
      }
  
  #define CACHE_SIZE size
  long tags[CACHE_SIZE];
  </code></pre>
  
  <p>The error is produced on the last line, "long tags[CACHE_SIZE]"</p>
  
  <pre><code>expected constant expression
   cannot allocate an array of constant size 0
  </code></pre>
  
  <p>Please tell if there is another way to do this thing</p>