2011-03-20 90 views
1

不兼容我很困惑为什么我得到这个错误。标题的错误与原型Globals.h发生的事情:声明与原型

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

和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"); 
    } 
} 
+0

什么是错误?编译错误?你有使用名称空间标准;在你的代码? – 2011-03-20 15:09:57

回答

2

你忘了在原型的结束分号。你的签名是一个匹配,暗示你可能已经忘记了这个命名空间。

+0

这是它的分号,谢谢! – pighead10 2011-03-20 15:21:44