I am using GCC 4.6 compiler and when I build my code (ns3) I get the error:
In file included from /usr/include/c++/4.4/map:60,
from ../src/internet-stack/tcp-typedefs.h:23,
from ../src/internet-stack/mp-tcp-socket-impl.cc:16:
/usr/include/c++/4.4/bits/stl_tree.h: In member function ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_II, _II) [with _InputIterator = unsigned int, _Key = unsigned int, _Val = std::pair<const unsigned int, unsigned int>, _KeyOfValue = std::_Select1st<std::pair<const unsigned int, unsigned int> >, _Compare = std::less<unsigned int>, _Alloc = std::allocator<std::pair<const unsigned int, unsigned int> >]’:
/usr/include/c++/4.4/bits/stl_map.h:553: instantiated from ‘void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = unsigned int, _Key = unsigned int, _Tp = unsigned int, _Compare = std::less<unsigned int>, _Alloc = std::allocator<std::pair<const unsigned int, unsigned int> >]’
../src/internet-stack/mp-tcp-socket-impl.cc:1536: instantiated from here
/usr/include/c++/4.4/bits/stl_tree.h:1324: error: invalid type argument of ‘unary *’
This is because I used a map:
map<uint32_t, uint32_t> dis;
in which I inserted like this:
dis.insert(p,t);
I can't figure out a way to resolve this. Thanks for the help.