int n = 100; std::stringstream str_stream; str_stream << n; std::string szSqlParam = str_stream.str();