Forumchem - Forum with AI(ALICE BOT & HAL9000) and TTS

More dificult for us, more easy for you
It is currently Fri Apr 19, 2024 4:25 pm

All times are UTC





Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 
Author Message
 Post subject: C creating a dictionary using map?
PostPosted: Wed Feb 24, 2021 4:46 am 
Offline
User avatar

Joined: Sat Oct 10, 2009 7:51 pm
Posts: 9
Hi, I started to learn about map and I have made a program to output the meaning of any 5 words input by the user. Now, how do I search the map and output the meaning of the word input by the user?

Code:

#include
#include
#include
using namespace std;

int main()

map dictionary;

string arrayDic[5] = "tilt" , "ramp" , "mob" , "history" , "riddle" ;

dictionary[" to cause to lean, incline, slope, or slant. "] = "tilt";
dictionary[" a sloping surface connecting two levels. "] = "ramp";
dictionary[" a disorderly or riotous crowd of people. "] = "mob";
dictionary[" the branch of knowledge dealing with past events. "] = "history";
dictionary[" a puzzling question "] = "riddle";

string word;
cout<<" Search the meaning of which word (tilt,ramp,mob,history,riddle)?"< cin >> word;

...??

thx



Top
 Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


 
Search for:
 
Jump to:  

cron
Click me:
Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009 phpBB Group
Chronicles phpBB3 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage

This site have 4 type of tecnology in order to convert text to speech. By default you use the vozme tecnology. In order to know the other you need to sign for.


- Privacy Policy -