this application has requested the runtime to terminate it in an unusual way

0
 
#include <iostream>
using namespace std;

int main() {
    int liczba;
    try {
        cout << "Podaj liczbe: ";
        cin>>liczba;
        if(liczba<0) throw "Mniejsze od zera";
    }
    catch(string w) {
        cout << w;
    }
}

Program ten po wpisaniu ujemnej liczby wypisuje w konsoli taką oto informację:

This application has requested the runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

W linkach z google ktoś pisał, żeby zainstalować jakieś pakiety Visuala, zainstalowałem x86 i x64, ale nic to nie dało. Program kompiluję w codeblocks. Wie ktoś o co chodzi?

0

Rzucasz char*, a nie string.

0

A rzeczywiście, dzięki

1 użytkowników online, w tym zalogowanych: 0, gości: 1