你的实际代码是这样的:
Dictionary::Dictionary() {
...
Word* fromRecord(const string &theWord,
const string &theDefinition,
const string &theType)
{
...
}
...
}
Run Code Online (Sandbox Code Playgroud)
换句话说,您在函数中定义函数.这是不允许的.