I tried to make a function , using iterators, to walk a deque backward and my function does not work . I would appreciate if somebody cna help me :
double Dq_Iter_Backward()
{
deque<int>::reverse_iterator InvDeqIter;
DeqIter=intdeq.begin();
InvDeqIter = intdeq.end()-1;
for(InvDeqIter = intdeq.end()-1;InvDeqIter!=intdeq.begin()-1;--DeqIter)
{
cout<<InvDeqIter;
}
elapsed = clock()- start_time;
elapsed_time = elapsed / ((double) CLOCKS_PER_SEC);
return elapsed_time;
}