I have a C++ problem.
I'm working with CodeBlocks, and I'm declaring: #include < queue >
to use a priority_queue
like that:
priority_queue<pair<int,int>,vector<int>,Lower> p;
where Lower is defined:
struct Lower{
bool operator<<(priority_queue<pair<int,int>,vector<int>,Menor> p1, priority_queue<pair<int,int>,vector<int>,Menor> p2){
return p1.second<p2.second;
}
}
And, when I'm trying to iterate over p, declaring an iterator:
priority_queue<pair<int,int>,vector<int>,Menor>::iterator it;
It returns this error:
error: 'iterator' is not a member of 'std::priority_queue<std::pair<int, int> >'
I hope you can help me! Thanks.