// AhmedWafaa Typing


#include <iostream>

using namespace std;

class errordetecting {


void errordetection(){
	
    char  *space = new char[9999999999999999999999999999999999];
    
    delete [] space;
    
	}

};

int main() {
     try {
     	errordetecting check;
	 }
	 
	 catch(bad_alloc &e) {
	 	
	 	cout << "error" << e.what() << endl;
	 	
	 }
	 

	
	return 0;
}

Leave a comment

Your email address will not be published. Required fields are marked *