hectorDUQUE
Programmer
- Jan 29, 2007
- 23
hi guys,
do you know what this means:
i don't understand how a map structure can be a read only structure. The code is:
thanks in advance,
hector
do you know what this means:
Code:
error: increment of data-member 'std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::second' in read-only structure
i don't understand how a map structure can be a read only structure. The code is:
Code:
typedef std::map<string, int> map_groups2counters_type;
map_groups2counters_type::const_iterator groups2countersIterator;
groups2countersIterator = groups2counters.find( groups2counters_mapKey_ch );
if ( groups2countersIterator == groups2counters.end() ){
//does not exist, so initializa the counter
groups2counters.insert(std::make_pair(groups2counters_mapKey_ch, 1));
} else{
//exists, so increase the counter
groups2countersIterator->second++;
}//if
thanks in advance,
hector