#include #include #include using namespace std; int main(int argc, char **argv) { int i = 0; double d = 0; try { i = stoi(string(argv[1])); d = stod(string(argv[2])); cout << fmt::format("i + d = {0:f}", i + d) << endl; } catch (invalid_argument ex) { cout << "Can't convert command line argument!" << endl; } catch (exception ex) { cout << "Don't know what went wrong!" << endl; } // C++ doesn't support true finally blocks { cout << "This statement always executes." << endl; } return 0; }