int max(int a, int b){return a > b ? a : b;}
比较函数需要实习
您只定义了函数,没有说明函数的功能和返回值把第2行改为:int max(int a,int b){if(a>b)return a;else return b;}