title: Trouble with argc and argv
body: <p>Trying to add command line arguments to my programs.  So I was experimenting and cannot figure out this intellisense warning for the life of me.  It keeps on saying it is expecting a ')', but I have no idea why.</p>
  
  <p>Here is the code it does not like:</p>
  
  <pre><code>    // Calculate average
      average = sum / ( argc – 1 );   
  </code></pre>
  
  <p>Then it underlines the subtraction operator.  Below is the full program.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main( int argc, char *argv[] )
  {
      float average;
      int sum = 0;
  
      // Valid number of arguments?
      if ( argc &gt; 1 ) 
      {
         // Loop through arguments ignoring the first which is
         // the name and path of this program
         for ( int i = 1; i &lt; argc; i++ ) 
         {
             // Convert cString to int 
             sum += atoi( argv[i] );    
         }
  
         // Calculate average
         average = sum / ( argc – 1 );       
         std::cout &lt;&lt; "\nSum: " &lt;&lt; sum &lt;&lt; '\n'
                &lt;&lt; "Average: " &lt;&lt; average &lt;&lt; std::endl;
     }
     else
     {
     // If invalid number of arguments, display error message
         // and usage syntax
         std::cout &lt;&lt; "Error: No arguments\n" 
           &lt;&lt; "Syntax: command_line [space delimted numbers]" 
           &lt;&lt; std::endl;
     }
  
  return 0;
  </code></pre>
  
  <p>}</p>