std::bad_array_new_length class in C++ with Examples
Standard C++ contains several built-in exception classes, std::bad_array_new_length is one of them.It is an exception on bad array length and thrown if the size of array is less than zero and if the array size is greater than the limit. Below is the syntax for the same:
Return: The std::bad_array_new returns a null terminated character that is used to identify the exception.
Note: To make use of std::bad_array_new, one should set up the appropriate try and catch blocks.
Below are the Programs to understand the implementation of std::bad_array_new in a better way: