In addition to you needing to use code tags, it would be nice to know what the problem is.
Is it a compiler error?
Is it a linker error?
Is it a core dump during execution?
Do you get the wrong result during execution?
If it is compiler or linker, paste the error message you got.
If it is a core dump, say so.
If it is the wrong result, tell us what you expected and what you received.
I think I got it working with 3 changes. Edit your post to use code tags so I can refer to line numbers and guide you through the changes. Edit the post. Highlight the code and click the "<>" button to the right of the edit window.
Good day. A lot of people face this problem. In the article: https://light-it.net/blog/things-you-should-know-before-you-create-telemedicine-app/ you can see the correct code and all the answers to your questions. Initialize "left" and "right." It is necessary to write to the tree and display in a formatted format a directory of files (such as windows)