Translation of python to C++

Jan 3, 2016 at 8:44am
Hi guys recently I've been translating a python code into its c++ version. I observed that the python code had something called 'lookup' where the user could assign variables to it and when the user enters something into the python program, the software will check whether the input corresponds to any of the variable in the 'lookup group' before following up with other actions. Is there any way I could replicate the same thing on c++ as well? Thanks.

Last edited on Jan 3, 2016 at 8:45am
Jan 3, 2016 at 8:47am
Sounds like you want a map.

http://www.cplusplus.com/reference/map/map/
Jan 3, 2016 at 9:11am
Yes I think that is what I want but are there any tutorials for how to use it, template etc? Thanks.
Jan 3, 2016 at 10:57am
Here is an idea, go to youtube and google, type c++ map tutorial, and see where the storm takes you.
Topic archived. No new replies allowed.