title: Why am I getting the error with max function when I use long long int and int as arguments
body: <p>I'am new to C++ just had this unexpected error with using <code>max</code> function, where I pass arguments of type long long and int</p>
  
  <p>When i pass <code>(int,int)</code> as arguments or <code>(long long,long long)</code> it works fine but not with <code>(long long,int)</code> </p>
  
  <pre><code>ll painter(int board[],int n,int k)
  {
  
   ll  s = 0,total_min;
   ll ans;
  
   for(ll i = 0;i &lt; n;i++)
     { total_min += board[i];
         s = max(s,board[i]);
  
  }
  </code></pre>
  
  <p>This is the error showing</p>
  
  <pre><code>prog.cpp:39:25: error: no matching function for call to 'max(int&amp;, long long int&amp;)
          s =max(s,board[i]);"
  </code></pre>