开发者

Declaration is incompatible with prototype

I'm confused at to why I'm getting this error. The title's error is happening with the prototype in Globals.h:

void NPCTalk(std::string const& speaker,std::vector<std::string> const& text)

开发者_如何学Cand the function in Functions.cpp:

void NPCTalk(string const& speaker,std::vector<std::string> const& text){
    vector<string>::const_iterator it;
    for (it=text.begin();it!=text.end();it++){
        cout << speaker << ": " << *it << endl << endl;
        system("PAUSE");
    }
}


You forgot the semicolon at the end of the prototype. Your signatures are a match which suggests to me that you may well have forgotten the namespace in question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜