ive been trying to improve my skills when it comes on to using maps and iterators but i seem to be mostly failing can someone please tell me where im going wrong or point me in the right direction
compiler error
a.cpp:20:55: error: conversion from ‘std::map<std::basic_string<char>, Object*>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, Object*> >}’ to non-scalar type ‘std::map<std::basic_string<char>, Object>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, Object> >}’ requested
a.cpp:20:71: error: no match for ‘operator<’ in ‘itr < _c.std::map<_Key, _Tp, _Compare, _Alloc>::end<std::basic_string<char>, Object*, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, Object*> > >()’
my code
#include "object.hpp"
#include <map>
int main()
{
std::map<string, Object*> _c;
Object *a = new Object();
Object *b = new Object();
Object *c = new Object();
Object *d = new Object();
_c["dbdb"] = a;
_c["dbh"] = b;
_c["dbdfgdb"] = c;
_c["dbdbgdsfg"] = d;
for( std::map<string, Object>::iterator itr=_c.begin(); itr < _c.end(); itr++)
{
}
}