开发者

Declaration is incompatible with prototype

开发者 https://www.devze.com 2023-02-19 00:50 出处:网络
I\'m confused at to why I\'m getting this error. The title\'s error is happening with the prototype in Globals.h:

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

精彩评论

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