Constant iterator through a set

This is probably really obvious, but im at a loss.

So I have to iterate with a constant iterator through a set of objects to display them, but I am getting errors when I implement the for loop.
set<Item> itemList;
	pair<set<Item>::const_iterator,bool> pairSet;
	iterator<set<Item>::const_iterator,bool> key;

Later on in the code, I have a display function that is sent the set and iterator and has the code:
for( loc = vehicleList.begin();loc = vehicleList.end(); ++loc){
		cout << *loc << ".  " << item << endl;

which has the error that says there is no operand for it.
I've only overloaded the < and the == and that's all we are supposed to do

I feel like I'm missing an obvious step, any help is appreciated.

What error message do you get? The second = in the loop should be !=.

Topic archived. No new replies allowed.