So i was solving a question in leetcode using multiset.
Line 20: Char 35: error: incompatible operand types (‘_Self’ (aka ‘_Rb_tree_const_iterator’) and ‘reverse_iterator<_Rb_tree_const_iterator>’)
20 | stream.size()%2!=0?–it:++rit;
| ^~~~~ ~~~~~
stream is the name of multiset i used
Can somebody explain why and how to fix it
to move the iterator i used increment and decrement expecting the iterator to shift its position respectively because i saw this operator in GfG (link to GfG article -https://www.geeksforgeeks.org/multiset-in-cpp-stl/)
Raj Kumar Roul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.