Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help defining a class in C++ that acts like a python dictionary. I need to be able to add keys-values to an already

I need help defining a class in C++ that acts like a python dictionary. I need to be able to add keys-values to an already existing dictionary. For example

id= {'sam':75, 'robert':09907, 'timmmy',95453, 'samuel',5333)}.

i want to create a class in which i can do

id.add("samuel', 8439922) and it adds it to the dictionary. i want to implement this with using vectors to store the pairs.

I need to do this without using any features like maps, every thing has to be made from scratch.

edit: does not need to be generic, can be with strings and ints

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

Students also viewed these Databases questions