title: How to assign enum variable to a pointer of array index
body: <p>Say I have <code>enum unit{ var1, var2, var3};</code>
  Then I have an array in the main function </p>
  
  <pre><code>int main (int argc, char *argv[]);
  </code></pre>
  
  <p>I want to assign <code>argv[1]</code> to <code>var1</code>, where <code>argv[1]</code> was input through command line, I m not sure how to go about doing this for pointer of array. I know how to get the input from command line but trouble assigning it to <code>var1</code>.</p>