To fix the issue you can do I've got a compiled dll file (dll binary) without source code. I have to delete some functions from this dll. Dll is written in C++. , Friends, here is solution works for me. Solution code :
?Func1@@YAHH@Z proc near ;GetSquaredNumber
arg_0= dword ptr 8
push ebp
mov ebp, esp
mov eax, [ebp+arg_0]
imul eax, eax
pop ebp
retn
?Func1@@YAHH@Z endp
__declspec(dllexport) int Func1(int x) // GetSquaredNumber
{
int y_res = 0;
__asm
{
mov eax, [x]
push ebp
mov ebp, esp
imul eax, eax
pop ebp
mov [y_res], eax
}
return y_res;
}
Share :

Delete function in binary search tree in haskell
By : Laksshman Sundaram
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , How can I implement a function to delete an element in a binary search tree? This is my tree: , You should implement a function code :
delMin :: Tree a > (Tree a, a)
 delete' n deletes the node n and returns a modified BST
delete' :: Ord a => Tree a > Tree a
delete' (Node _ l Leaf) = l
delete' (Node _ Leaf r) = r
delete' (Node _ l r) = let (r', min) = delMin r in
Node min l r'

Delete function for binary tree
By : user3167151
Date : March 29 2020, 07:55 AM
Does that help Either the largest of the nodes to the left or the smallest of the nodes to the right will take it's place! Simply put one of these where the deleted node was (and delete them from your previous position) and your tree will still be a valid binary search tree. Take a look at this example: code :
15
/ \
… 25
/ \
20 30
\
23

Delete function in Binary Tree in C
By : Pyro
Date : November 27 2020, 09:01 AM
I wish this help you Basically i was only replacing the node with itself, but this can be solved by replacing the deleted node with the minimum element in the right subtree or the maximum element in the left subtree. The function that works: code :
treeNode * Delete(treeNode *node, int data)
{
treeNode *temp;
if(node==NULL)
{
printf("Element Not Found");
}
else if(data < node>data)
{
node>left = Delete(node>left, data);
}
else if(data > node>data)
{
node>right = Delete(node>right, data);
}
else
{
/* Now We can delete this node and replace with either minimum element
in the right sub tree or maximum element in the left subtree*/
if(node>right && node>left)
{
/* Here we will replace with minimum element in the right sub tree */
temp = FindMin(node>right);
node > data = temp>data;
/* As we replaced it with some other node, we have to delete that node */
node > right = Delete(node>right,temp>data);
}
else
{
/* If there is only one or zero children then we can directly
remove it from the tree and connect its parent to its child */
temp = node;
if(node>left == NULL)
node = node>right;
else if(node>right == NULL)
node = node>left;
free(temp); /* temp is longer required */
}
}
return node;
}

Delete node function will not delete certain nodes from a binary search tree
By : RAVINDRA MULLAMURI
Date : March 29 2020, 07:55 AM
will be helpful for those in need The tree is sorted alphabetically the first letter of words. Some words I can delete, some I cannot. As in I try to delete it and nothing happens, but it still exits the deleteWord function. It will also get down to two words left in the tree and when I try to delete one of them, the program does nothing. It simply gives me a blank line which i cannot enter anything into; its stuck in a while loop somewhere but I cant figure out why. Sometimes I try to delete a word and instead of it being deleted, it is replaced by the data of another node and I have a duplicate node. I know theres a logic error in here but I cant find it. , edited the final else statement to read: code :
else
{
cout << "else entered.\n";
if(current > data.getWord() < current > parent > data.getWord())
{
current > parent > left = NULL;
current = NULL;
found = true;
}
else if(current > data.getWord() > current > parent > data.getWord())
{
current > parent > right = NULL;
current = NULL;
found = true;
}
else
{
current = NULL;
found = true;
}
}

Binary Tree delete function error
By : Rico
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Hey I want to delete a node from my binary tree. I know a node cannot be deleted if it has both right and left children. So I have written code accordingly. But every time the program runs, it crashes. , Quick look:

