哈哈,再也不用记stoi stoll。。。这一堆函数了
#include <sstream> template <class SRC, class DST> void Str22Num(SRC& src, DST& dst) { std::stringstream in; in << src; std::stringstream out(in.str()); out >> dst; }
感谢:https://blog.csdn.net/Vic___/article/details/9324897