淘先锋技术网

首页 1 2 3 4 5 6 7
int string2int(std::string& str)
        {
            std::istringstream in_stream(str);
            int res;
            in_stream >> res;
            return res;
        }

        std::string int2string(int num)
        {
            std::ostringstream out_stream;
            out_stream << num;
            return out_stream.str();
        }