title: Capture command line argument and store it
body: <p>I'm trying to capture a command line argument and store it as a string however i get a compiler error when I'm trying to convert it to an int as :</p>
  
  <blockquote>
    <p>The error is: initialization makes integer from pointer without a cast
    [enabled by default]
         char test = argv[1];</p>
  </blockquote>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char** argv)
  {
  
  char test = argv[1];
  printf("%c\n", test);
  
  return 0;
  }
  </code></pre>