stoi 当字符串不符合规范时,会抛出异常,所以你应该捕获异常来做。 ... int x; try { x = stoi(y); } catch (std::invalid_argument&){ // if no conversion could be ...
確定! 回上一頁