In C++, there are certain types of exceptions that are not allowed to be thrown. These include void, function type, reference type, and array of non-zero bound with elements of these types.Let's see an example program that demonstrates this:#include <iostream>using namespace std;int main() { try { // Attempt to throw an exception of type void throw void(); } catch (...)...
Showing posts with label Write a program that demonstrates how certain exception types are not allowed to be thrown.. Show all posts
Showing posts with label Write a program that demonstrates how certain exception types are not allowed to be thrown.. Show all posts