mardi 28 février 2017

C++ .what() error

I am using Netbeans. Iostream,string,cstdlib and stdexcept are included but I keep getting the error Unable to resolve identifier .

int main()
    try{
    for (int i{-3};i<10;++i)
        cout <<i << '\t' << divi(100,i) << endl;
    return 0;
    }
catch (std::exception& e){
    std::cerr << e.what();
    return -2;
}
catch ( ... ){
    std::cerr << "Unknown exception";
    return -1;
}

Aucun commentaire:

Enregistrer un commentaire