Implementation of Vector in C++ [closed]
I recently wrote an implementation of STL Vector as a programming exercise. The program compiles but I receive a strange error saying: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc I've never come up with this error before and am not sure what exactly should be changed within my implementation to make it function correctly. Can someone take a look through my code and see if anything jumps out at them as wrong in this specific case? Sorry I can't be more specific, I'm not sure where to look myself, thanks in advance. #include <iostream> #include <string>