13,871
社区成员




while(getline(input,line))
{
istringstream stream(line);
string word;
bool firstword=true;
while(stream>>word)
{
map<string,string>::const_iterator map_it=trans_map.find(word);
if(map_it!=trans_map.end())
word=map_it->second; //运行成功
if(firstword)
firstword=false;
else cout<<" ";
// word=map_it->second; //运行产生错误
cout<<word;
}
cout<<endl;
}