Question
I have a C++ dictionary red-black tree program that has 5 options which are 1. search, 2. edit, 3. add, 4. view, and 5. sort.
I have a C++ dictionary red-black tree program that has 5 options which are 1. search, 2. edit, 3. add, 4. view, and 5. sort. Can you please modify my view option and edit option. For "view" option, the program should ask the user "Words that start with letter: ___". When the user enters 'A', it should only display all the words starting with letter A including their meanings. For example:
user input: 4 (since view option is case 4) program output: "Words that start with letter: ____" user input: A program output:
-
Abacus - an instrument for performing calculations by sliding counters along rods or in grooves
-
Abandon - to give up to the control or influence of another person or agent
-
Ability - the power or skill to do something
For edit option, the program should ask the user "Do you want to edit the word or edit the meaning?" If the user enters "word", the program will ask for the word then the user can enter the new spelling of the word. If the user enters "meaning", the program will ask for the word then the user can enter the new meaning.
user input: 2 (since edit option is case 2)
program output: Do you want to edit the word or edit the meaning? user input: word
program: enter the word user input: Abacus
program output: enter the new spelling of the word
user input: Abacuss
program output: successfully edited! Here is my code:
/* this is the whole code please run in any c++ compiler which supports c++14 */
/* i use map STL which is use red-black tree and elements are inserted are sorted by default*/
#include
int main() { map
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started