红点处add函数需要传入的是指针,而x是int型变量,把average(int x,int *pb)改为average( int x[ ],int *pb)
void average(int x[],int *pb)这个函数第一个参数应该是数组