マップ内のキューの変更に問題があります。
map<string , queue<item*> > itemList; // what the map creation looks like
map<string, queue<item*> >::const_iterator itr; // creating an iterator
//for every item in a warehouse
for(itr = itemList.begin(); itr != itemList.end(); ++itr)
{
//while there are items in the queue with 1 day shelf life
while(itr->second.front()->getLife() == 1)
{
//throw them away
itr->second.pop();
}
}
しかし、私はこれを伝えるエラーが発生し続けます:
エラー: 'const std::queue > >' を 'std::queue > >& std::queue > >::operator=(const std::queue > >&)' の 'this' 引数として渡すと、修飾子が破棄されます
これについて何か助けてくれてありがとう。:-(