Hallo Leute,
ich programmiere gerade ein Programm in C++ auf dem PC. Benutze dazu
eclipse CDT.
In meinem Programm benutze ich exception handling, was aber aufgehört
hat zu funktionieren. Selbst wenn ich ein einfaches Programm wie:
1 | #include <iostream>
|
2 | using namespace std;
|
3 |
|
4 | int main(int argc, char *argv[]) {
|
5 | try {
|
6 | throw 20;
|
7 | } catch (int e) {
|
8 | cout << "An exception occurred. Exception Nr. " << e << '\n';
|
9 | cout.flush();
|
10 | }
|
11 | return 0;
|
12 | }
|
schreibe, fängt er die exception nicht und ich bekomme auf cerr die
Ausgabe:
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
Wenn ich ein neues Projekt erstelle, dann funktioniert es alles
Einwandfrei. Woran kann es liegen, dass es im einen Projekt funktioniert
und im anderen nicht?
Gruß, Yaro