I have just started to learn C++ and am fluent at coding in Python. I wanted to make one of my old python programs again in C++ and it's a word jumble one. In the Python program, you can choose the mode (easy, medium or hard). That aside each mode has it's own dictionary of words which the program chooses randomly. Paired to each word is a hint, hence using the dictionary.
Could someone explain how I would do this in C++?
Thank You
PS. I've got here so far, but I get errors
//Word Jumble - Ben
#include <iostream>
#include <cstdlib>
#include <map>
#include <string>
using namespace std;
int computer(){
cout << "\nYOU ARE PLAYING AGAINST THE COMPUTER";
cout << "COMPUTER IS JUBMBLING WORD...";
system("PAUSE");
system("CLS");
map easy
easy = {{"Ship","A large boat"}, {"Ladder","A Piece of Apparatus that helps you climb things"},{"Water","What the human body is mainly composed of"}};
int main(){
cout << "\n\n WELCOME TO WORD JUMBELE";
cout << "\n BY BEN";
computer()}
Errors:
C:\Users\Ben\SkyDrive\Documents\C++\Word Jumble\Word Jumble.cpp:12:9: error: missing template arguments before 'easy'
C:\Users\Ben\SkyDrive\Documents\C++\Word Jumble\Word Jumble.cpp:12:9: error: expected ';' before 'easy'
C:\Users\Ben\SkyDrive\Documents\C++\Word Jumble\Word Jumble.cpp:17:15: error: expected '}' at end of input