Wednesday, February 27, 2013

random access of stl

set<int>::iterator iter=test.end();

iter=iter-1; //not allowed!!

iter--; //allowed

deque...

iter=iter-1;//allowed

list...

iter=iter-1;//not allowed!
iter--;//allowed

No comments:

Post a Comment