我正忙于阅读我的 C++ 书,似乎无法在没有错误“[Error] 'vector' is not declared in this scope”的情况下运行它
#include <iostream>
using namespace std;
int main(){
string word;
string previous;
string current;
vector<string> dislikes(4);
dislikes [0] = "bob";
dislikes [1] = "cat";
dislikes [2] = "pineapple";
dislikes [3] = "stackoverflow";
while(cin >> current){
for(i = 0; i<dislikes.size(); ++i){
if(current==dislike[i]){
cout << "BLEEP ";}
else{cout << current << " "}
}
previous = current;
}
}
return 0;
}