I would like to wrap a std::map
so the client is unaware that I am storing their positive integer keys actually as negative integers. I need to allow iterating
I guess you want this:
if( false == o.empty() )
{
do
{
std::cout << "key: " << key << " val: " << value << std::endl;
}while (o.getNextElement(key, value));
}
To judge whether it is 'null', before you get elements.
do
{
std::cout << "key: " << key << " val: " << value << std::endl;
}while (o.getNextElement(key, value));
So all operations are within the loop like this.