Compiler Shows Error : free() double free detected in tcache 2

I used the same code used by Prateek Bhaiya. When I run the code for the first time, table size has not increased. When I run it the second time, the error pops up. please help. It happens after entering the rehash() function probably.

yes problem is in rehash function

delete [] old_table; this line should come outside the for loop

cut form line no 79 and past at line no 81

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning: