I have a problem concerning modifying the elements of a binary tree. This is the error I get: Access violation reading location 0x00000018. I think I'm accessing a null pointer but I don't know how to solve the problem.
This is the code that I used:
void modifyStatus(nod* root)
{
if (root->info.st == done)
root->info.st = reachedDest;
modifyStatus(root->st);
modifySatus(root->dr);
}
I must specify that "done" and "reachedDest" are the elements of an enum.
rootisnullptr? How aboutroot->st?