Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hi there, I'm trying to print the element of a binary search tree so i have the following procedures:
PROCEDURE bst_print_descending (root:node);
if (root <> nil) then
Canvas.TextOut (0,0 , IntToStr (root^.key)+ ' ['+ IntToStr(root^.level)+'] ');
procedure TForm1.DescendingOrder1Click(Sender: TObject);
Now, there seems to be a problem with the Canvas.TextOut; when i click the button to print the elements, the program gives me an error, something about access violation at address 00000000..
Now, i tried moving the Canvas.TextOut to the second procedure and it worked...The only problem is, to print all the elements in a tree i need a recursive procedure
Again, the error occurs when i call a procedure with Canvas action in it.... so anyone has any suggestions??
0 · ·