title: Error on Xcode "No matching function for call to 'max'"
body: <p>This is the statement that I'm using but it says that no matching function for call to 'max'</p>
  
  <pre><code>max((used_minutes-Included_Minutes)*extra_charge,0) 
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>Code</strong></p>
  
  <pre><code> int used_minutes; const int Included_Minutes = 300;
   double total_charge, extra_charge;
   cout &lt;&lt; "Enter the number of phone call minutes: ";
   cin &gt;&gt; used_minutes;
   cout &lt;&lt;"Number of phone call minutes used - included in the base plan: " &lt;&lt; min(used_minutes,Included_Minutes) &lt;&lt; endl;
   cout &lt;&lt;"Number of phone call minutes used - not included in the base plan: "&lt;&lt; max(used_minutes-Included_Minutes,0) &lt;&lt; endl;
   extra_charge = 0.10;
   cout &lt;&lt;"Cost of excess phone call minutes: $"&lt;&lt;fixed &lt;&lt; setprecision(2) &lt;&lt; max(used_minutes-Included_Minutes)*extra_charge, 0) &lt;&lt;endl;
  </code></pre>