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