Question: Help me with this hashtable copy constructor and assignment operator. I passed my own test cases but my professor's testing case keeps telling me I

 Help me with this hashtable copy constructor and assignment operator. Ipassed my own test cases but my professor's testing case keeps tellingme I have bugs. I cannot figure it out where. Here is

Help me with this hashtable copy constructor and assignment operator. I passed my own test cases but my professor's testing case keeps telling me I have bugs. I cannot figure it out where. Here is my code for copy constructor and assignment as well as the put function it will use. Entry is another class object with private member key and data. Can anyone take a look and tell me where my implementation might go wrong?

6 #ifndef table h #define table h 9 #include "entry"h" 10 #include iostream 11 #include 12 #include 13 14 using namespace std; 15 16 typedef std: :vectortable; max t . get-max( ) ; this->table-new Wxl[max]; // WX1* temp t.get_table(); for(int i -0 iput(t.table[i][k].get_key),t.tableti][k].get_data)); //table[i].push_back (temp[i][k]); return *this; Table:: Table(const Table& t)f max-t.get_max table new Wxl[max]; / Wx1* temp t.get_table); for (int i = 0; i 12 #include 13 14 using namespace std; 15 16 typedef std: :vectortable; max t . get-max( ) ; this->table-new Wxl[max]; // WX1* temp t.get_table(); for(int i -0 iput(t.table[i][k].get_key),t.tableti][k].get_data)); //table[i].push_back (temp[i][k]); return *this; Table:: Table(const Table& t)f max-t.get_max table new Wxl[max]; / Wx1* temp t.get_table); for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!