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.
精彩评论