  // exceptions
    #include <iostream>
    using namespace std;
    class C {
       public:
        string srch(int &i) {
   			if (i == 0) {	//found
                cout << "got it: " << i << endl; return "i";
            }
           throw std::exception();

        }

     };

     int main () {
       C c = C();
       int i = 2;
       int j = 0;
       try
       {
         c.srch(j);
         c.srch(i);
       }
       catch (const std::exception &e) {
         cout << "An exception occurred. Exception Nr. " << e.what() << '\n';
       }
        return 0;
     }


 