自己写的快排中引用的函数编译异常

自己写的快排中引用的函数编译错误
错误 1 error C2064: 项不会计算为接受 2 个参数的函数 18
4 IntelliSense: 表达式必须具有 (pointer-to-) 函数类型 18
错误 2 error C2064: 项不会计算为接受 2 个参数的函数 26
错误 3 error C1903: 无法从以前的错误中恢复;正在停止编译 26
5 IntelliSense: 表达式必须具有 (pointer-to-) 函数类型 26
6 IntelliSense: 表达式必须具有 (pointer-to-) 函数类型 31
7 IntelliSense: 表达式必须具有 (pointer-to-) 函数类型 34


源代码:(编译环境VS2010)

#include <iostream>
#include <vector>
#include <algorithm>
#define and &&
#define or ||
using namespace std;


bool compare(int a,int b)
{
return (a<b);
}

void mysort(vector<double> &mydata,int s,int e,bool compare)
{
if (e-s<2)
{
if (!compare(mydata[s],mydata[e]))
swap(mydata[s],mydata[e]);
}
else 
{
int m=(e+s)/2;
int i=s,j=e;
double key=mydata[m];
while (j>=s and i<=j and !compare(mydata[j],key))
j--;
mydata[m]=mydata[j];
while (i<j)
{
while (i<e and i<j and compare(mydata[j],key))
i++;
mydata[j]=mydata[i];
while (j>s and i<j and !compare(mydata[j],key))
j--;
mydata[i]=mydata[j];
}
mydata[j]=key;
if (i==s or j==s)
mysort(mydata,s+1,e,compare);
else if (i==e or j==e)
mysort(mydata,s,e-1,compare);
else
{
mysort(mydata,s,i,compare);
mysort(mydata,j,e,compare);
}
}

}

int main()
{
vector<double> mydata;
double datain;
while (cin>>datain)
mydata.push_back(datain);
mysort(mydata,0,mydata.size()-1,compare);
for (int i=0;i<mydata.size();i++)
cout<<mydata[i]<<endl;
cout<<endl;
system("pause");
}


------解决方案--------------------
void mysort(vector<double> &mydata,int s,int e,bool compare)
-----------
这里错了
typedef bool (*pFN_Compare)(int, int)
void mysort(vector<double> &mydata,int s,int e,bool compare)
-->
void mysort(vector<double> &mydata,int s,int e,pFN_Compare compare)