错误预期';'

use*_*555 0 c++

我有以下代码,IntelliSense: expected a ';'在指示的行报告错误:

Som*_*ude 9

你的实际代码是这样的:

Dictionary::Dictionary() {
    ...

    Word* fromRecord(const string &theWord,
        const string &theDefinition,
        const string &theType)
    {
        ...
    }

    ...
}
Run Code Online (Sandbox Code Playgroud)

换句话说,您在函数定义函数.这是不允许的.

  • @AliAlamiri构造函数是一个普通函数,它只是在类之后命名,并且没有返回类型. (2认同)