C++ command line argument for .exe program
<p>I have <code>program.exe</code> that is being created on my Windows machine. For some reason I am not able to pass in command line arguments properly.</p>
<pre><code>int main(int argc, char *argv[]) {
    
  ///////testing
  cout &lt;&lt; &quot;\n\n(int)ARGV[1]: &quot; &lt;&lt; (int)argv[1] &lt;&lt; &quot;\n\n&quot;;

  return 0;
} 
</code></pre>
<p>In terminal I run:</p>
<pre><code>program.exe 4 
</code></pre>
<p>I see <code>(int)ARGV[1]: 15333464</code> printed to my console.</p>
<p>Why does this happen, and how I can modify the code? I should get the number 4 printed out.</p>