How do we find the predecessor and the successor of a node in a B-Tree?

How can we find the predecessor and the successor of a node in a B-Tree? I mention that the search, delete and insert function are like in the article on geeksforgeeks. How can we use the getPred and getSucc functions from this article : https://www.geeksforgeeks.org/delete-operation-in-b-tree/ ? BTree t(3); // we create a B tree that has degree 3 t.Insert(6); t.Insert(5); t.Insert(4); t.Insert(3); t.Insert(2); t.Insert(1); t.Insert(0); t.Insert(-1); t.Insert(-2); Let`s say we insert these keys into the B-Tree. I tried like that : treeNode* x = t.Search(3); // find the node that contains the key 3 // x->findKey(3) returns the position in the node where the key 3 appears cout << x->getPredecessor(x->findKey(3)); // that doesn’t work – How can I solve this problem? Thank you very much!