I am trying to implement a 2-3-4 tree and I have a problem at the insertion stage. I am creating a variable "cur", which stores an object of the Node class, which is a node in the tree, by reference. When you try to change the variable "cur", it changes inside the function without changing the reference in the tree itself. I tried to return a value in the "split" function and assign it to the "cur" variable and change it immediately in the function, but nothing worked. Can you tell me how I can change the value for the whole tree?
#Implementation of the 2-3-4 tree. The problem with links
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @cold wigeon! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Yeah.... this is not cpp where u have pointer manipulation
U can't use methods that way, u need to pass the object u want to modify (in this case the node) not the reference u want to alter
...
Also, ppl r not going to d/l a file from an untrusted source
Use pastebin with syntax hilighting rather
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.