I am trying to throw an exception in the following statement.
CODE
template <typename K>
void BST<K>::remove(Iterator &pos) throw (BSTException)
{
typename BST<K>::Iterator iter;
K target;
target = *pos;
remove(target);
while(!(iter.parents.empty()))
{
iter.parents.pop();
}
iter.currentNode = NULL;
if(target == NULL)
{
throw BSTException("BST Exception: iterator not found");
}
// iterator operation
// Exception : the given Iterator is not found
}
I get a warning saying
Warning: NULL used in arithmatic.
any ideas why???