Hi,
Can someone explain me why this work :
// Postfix dec
Iterator<T2> operator--(int) {
Iterator<T2> tmp(_node);
if (_node)
_node = _node->_prev;
return tmp;
}
and this doesn't :
// Postfix inc
Iterator<T2> operator++(int) {
Iterator<T2> tmp(_node);
if (_node)
_node = _node->_next;
return tmp;
}
give me the follwowing error :
Error : illegal initialization
(point of instantiation: 'Common::ConfigFile::ConfigFile()')
(instantiating: 'Common::List<Common::ConfigFile::Section>::~List()')
(instantiating: 'Common::List<Common::ConfigFile::Section>::clear()')
(instantiating:
'Common::List<Common::ConfigFile::Section>::erase(Common::List<Common::Confi
gFile::Section>::Iterator<Common::ConfigFile::Section>,
Common::List<Common::ConfigFile::Section>::Iterator<Common::ConfigFile::Sect
ion>)')
(instantiating:
'Common::List<Common::ConfigFile::Section>::Iterator<Common::ConfigFile::Sec
tion>::operator++(int)')
list.h line 69 Iterator<T2> tmp(_node);
thanks
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/