title: Printf and cout only printing first character of args cpp
body: <p>I may be completely missing the point here but I have the following method to print out the args in a cpp program in visual studio:</p>
  
  <pre><code>int _tmain(int argc, char* argv[])
  {
  
      char* fu = "Bar";
  
      std::cout &lt;&lt; "Test, " &lt;&lt; argc &lt;&lt; ", " &lt;&lt; argv[0] &lt;&lt; ", " &lt;&lt; argv[1] &lt;&lt; ", " &lt;&lt; fu &lt;&lt; endl;
          printf("%s, %s, %s", argv[0], argv[1], fu);
      return 0;
  }
  </code></pre>
  
  <p>The problem I am having is it only seems to print the first character of the args and not the whole string.</p>
  
  <p>From what I can tell, argv[0] dereferences the argv array to get a char*, and this is what I am passing into the cout/printf functions. They should then print all the characters up to a \0 character.</p>
  
  <p>I created the test char* fu to see if the problem was with passing in a char* to the functions, but 'Bar' is successfully printed.</p>
  
  <p>The only thing I can think is because the size of fu is known at compile time and the size of argv isn't something funny is going on with the way it is compiled.</p>
  
  <p>I know I can print out the contents by looping through the characters but this seems to defeat the point, for example what if I want to work with the strings for comparison or something.  Can someone please explain what's going on?</p>