I have just switched from Java to C++, so can someone explain what is wrong with this piece of code:
#include "x.hpp"
#include <iostream>
using namespace std;
int min(int a,int b,int c){
return minimum(minimum(a,b),c);
}
int minimum(int a,int b){
if(a<b) return a;
return b;
}
int main()
{
cout<<min(1,2,3)<<"\n";
return 0;
}
Compiler says that minimum
is undeclared. But why?
P.S. my IDE is Xcode