I don't understand what's wrong with this code.
#include <iostream> using namespace std; //Simple two number calculator //5-function calculator int main() { char aj; float a, j; cin >> a; cout << a; cin >> aj; cout << aj; cin >> j; cout << j; cout << " = "; try { if(j=0) { throw 44; } } catch (int x) { cout << x << " - can't divide by 0"; } switch(aj) { case '+': cout << a+j; break; case '-': cout << a-j; break; case '*': cout << a*j; break; case '/': cout << a/j; break; default: cout << "Error - not an operator!"; break; } return 0; }