I created a map of a pair and long long int -
map< pair< long long int, long long int >,long long int >;
and an interator -
map< pair< long long int, long long int >, long long int >::iterator it1;
and when I did it1=same.begin()
the compiler is throwing an error, why is this so ?
Error generated:
no viable overloaded '='
it1=same12.begin();
~~~^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/map:648:29: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from '__map_iterator<__tree_iterator<__value_type, [...]>, __node_pointer, [...]>>' to 'const __map_iterator<__tree_iterator<__value_type, [...]>, std::__1::__tree_node, long long>, void *> *, [...]>>' for 1st argument class _LIBCPP_TYPE_VIS_ONLY __map_iterator