异常问题
#include <iostream> #include <string>#include <exception>using namespace std;int main(){ try { if(1) throw "throw"; }catch(string str)//为什么不能把这样传值有问题//改成thrrow string("throw")或者catch(const char* str)就可以呢? { cout<<str<<endl; } return 0;}