2011-03-20 84 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