[ create a new paste ] login | about

Link: http://codepad.org/ZY57LXSW    [ raw code | output | fork ]

C++, pasted on Jul 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <string>
using namespace std;

int main() {

    try {
        cout << "inside try\n";
        throw "Text";
    }
    catch (char const* x) {
        cout << "in catch" << x << endl;
    }

    cout << "Done with try-catch\n";
}


Output:
1
2
3
inside try
in catchText
Done with try-catch


Create a new paste based on this one


Comments: