It gives compilation error...can u give me example without stl where invalid_argument excpetion is thrown and caught?Code:#include <iostream> #include <string> using namespace std; class A { int i;int j; public: A(int ii,int jj) { i=ii; j=jj; } void fun() { throw exception(); } }; int main() { try { A a1("Hi",1); // It shoudl throw invalid_argument exception but gives compile error } catch(invalid_argument&) { cout<<"Exception caught in main"; } }