Throwing out of range exception in C++

Replace throw std::out_of_range; with throw std::out_of_range ("blah");. I.e. you need to create an object, you cannot throw a type.

Leave a Comment