我想知道这里做错了什么:
class Grasp
{
typedef struct
{
int unique;
int intersection;
int sets;
float alpha;
int *covered;
int *choosen;
}best;
static best findSolution();
}
在 .cpp 上:
best Grasp::findSolution()
{
//it doesn't matter
}
该行有一个错误:best Grasp::findSolution()
' best ' 没有命名类型
为什么?