P
__PPS__
use stdexcept:
#include <stdexcept>
throw std::invalid_argument("Invalid command");
and
...
}catch(const std::exception& e){
cout << e.what() << endl;
}
#include <stdexcept>
throw std::invalid_argument("Invalid command");
and
...
}catch(const std::exception& e){
cout << e.what() << endl;
}