The problem is on the "MyIter = " line:
class OrientedPoint
{
.... class variables ...
std::map<std::string, double> DoubleValues;
.....
bool OrientedPoint::getDoubleValue(const std::string &ValueName, double &Value) const
{
std::map<std::string, double>::iterator MyIter;
MyIter = DoubleValues.find(ValueName);
The error produced is:
In member function 'bool OrientedPoint::getDoubleValue(const std::string&, double&) const':
error: no match for 'operator=' in 'MyIter = ((const OrientedPoint*)this)->OrientedPoint::DoubleValues.std::map<_Key, _Tp, _Compare, _Alloc>::find [with _Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Tp = double, _Compare = std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, _Alloc = std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> >](((const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)((const std::string*)ValueName)))'
note: candidates are: std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> >& std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> >::operator=(const std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> >&)
I setup an identical situation in a demo project and it seems to compile fine... does anyone see that there would be a problem with this? I just can't decypher the stl error as usual... haha
Thanks,
Dave