What is Wrong in this code???.Compiler displays the message that no matching function for call to max(int&, int&, int&, int&)
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>> a >> b >> c >>d;
max(a,b,c,d);
return 0;
}
int max(int a,int b,int c,int d)
{
if(a>b && a>c && a>d)
{
return a;
}
else if(b>c && b>d)
{
return b;
}
else if(c>d)
{
return c;
}
else
{
return d;
}
}