please em"brace" this in {} and consider writing std::runtime_error, "using namespace std" is considered breaking the purpose of namespaces.