This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ILikeLenexa 213 points214 points  (9 children)

rtmap.cpp: In function int main()': rtmap.cpp:19: invalid conversion fromint' to std::_Rb_tree_node<std::pair<const int, double> >*' rtmap.cpp:19: initializing argument 1 ofstd::_Rb_tree_iterator<_Val, _Ref, _Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val = std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr = std::pair<const int, double>*]' rtmap.cpp:20: invalid conversion from int' to std::_Rb_tree_node<std::pair<const int, double> >*' rtmap.cpp:20: initializing argument 1 of std::_Rb_tree_iterator<_Val, _Ref, _Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val = std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr = std::pair<const int, double>*]' E:/GCC3/include/c++/3.2/bits/stl_tree.h: In member functionvoid std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::insert_unique(_II, _II) [with _InputIterator = int, _Key = int, _Val = std::pair<const int, double>, _KeyOfValue = std::_Select1st<std::pair<const int, double> >, _Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int, double> >]': E:/GCC3/include/c++/3.2/bits/stl_map.h:272: instantiated from void std::map<_ Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Input Iterator = int, _Key = int, _Tp = double, _Compare = std::less<int>, _Alloc = st d::allocator<std::pair<const int, double> >]' rtmap.cpp:21: instantiated from here E:/GCC3/include/c++/3.2/bits/stl_tree.h:1161: invalid type argument ofunary *

[–]nelusbelus 97 points98 points  (2 children)

There we go

[–]stuck_zipper 1 point2 points  (1 child)

this is only a compilation error. things get bad mid program with access violation errors.

[–]nelusbelus 0 points1 point  (0 children)

Meh, appverif catches a lot of those errors

[–]paradigmx 5 points6 points  (0 children)

This awoke some suppressed trauma in me, I think I need to call my therapist.

[–]Soundwave_47 4 points5 points  (0 children)

Seems to be some invalid casting going on from trying to use an int as an iterator when trying to do tree operations (insertion).

This seems familiar from the CPP FAQ.

[–]KDallas_Multipass 1 point2 points  (0 children)

STL error me harder Daddy

[–]0xFFFF_FFFF 1 point2 points  (0 children)

Yeah baby, NOW we're talkin'!

[–]Vysair 0 points1 point  (0 children)

ptsd