title: Pass argv to function to populate global variable
body: <p>I'm trying to populate a global int variable by passing command line arguments to a function. When I do this, I get warnings (see below), as well as a funky return number (such as 52 instead of the expected 49).</p>
  
  <p>Any hints would be greatly appreciated. This is HW - but only a very small portion of the overall assignment.</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;stdlib.h&gt;
  #include "kangarooHeaders.h"
  
  
  int             numJoeys                = MIN_NUM_LEGAL_JOEYS - 1;
  
  int main (int argc, char* argv[])
  {
          initializeNumJoeys(argc,argv);
          printf("%d", numJoeys);
  }
  
  void initializeNumJoeys(void argc, void *argv[])
  {
          char line[LINE_LEN];
          if (argc &gt; MAMAS_NUM_JOEYS_CMD_LINE_INDEX)
                  numJoeys = *argv[1];
  }
  </code></pre>
  
  <hr>
  
  
  
  <pre class="lang-none prettyprint-override"><code>argv_test.c:13: warning: conflicting types for ‘initializeNumJoeys’
  argv_test.c:9: warning: previous implicit declaration of ‘initializeNumJoeys’ was here
  </code></pre>