title: Why does not argv work?
body: <p>I am a beginner to cpp and had a problem with the following code. Normally it should display the texts depending on the argv[1], but it does not display anything.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main (int argc, char* argv[])
  {
  
    if(argv[1] == "a" &amp;&amp; argc &gt; 1)  printf("hello world, argc: %d\n", argc);
    else if(argv[1] == "2" &amp;&amp; argc &gt; 1) printf("hello everyone, argc: %d\n", argc);
  
    for(int i=0; i&lt;argc; i++) printf("%s\n", argv[i]);
  
    return 0;
  }
  </code></pre>