A
arjor
hello guys
i get the following warning when i try to try an throw an exception
given by the new command.
declaration:
void CopyTree(Vertex*& copy, const Vertex* originalTree)
throw(bad_alloc);
defenition:
void BinSearchTree::CopyTree(Vertex*& copy, const Vertex*
originalTree) throw(bad_alloc)
{
if (originalTree == NULL)
copy = NULL;
else {
copy = new Vertex(originalTree->getElement());
CopyTree(copy->left_, originalTree->left_);
CopyTree(copy->right_, originalTree->right_);
}
}
i get the following warning: warning C4290: C++ exception
specification ignored except to indicate a function is not
__declspec(nothrow)
any help would be appreciated
i get the following warning when i try to try an throw an exception
given by the new command.
declaration:
void CopyTree(Vertex*& copy, const Vertex* originalTree)
throw(bad_alloc);
defenition:
void BinSearchTree::CopyTree(Vertex*& copy, const Vertex*
originalTree) throw(bad_alloc)
{
if (originalTree == NULL)
copy = NULL;
else {
copy = new Vertex(originalTree->getElement());
CopyTree(copy->left_, originalTree->left_);
CopyTree(copy->right_, originalTree->right_);
}
}
i get the following warning: warning C4290: C++ exception
specification ignored except to indicate a function is not
__declspec(nothrow)
any help would be appreciated