Skip to content
Search

Std::stringstream

lastmod 2026-11-10created 2016-11-182 edits

std::stringstream is a class defined in the sstream header of the C++ standard library that performs input/output stream operations on a string. With the insertion operator you can concatenate values of various types into a string, and with the extraction operator you can parse a string and convert it into numbers and the like; str() returns the underlying string. It combines the functionality of the input-only istringstream and the output-only ostringstream.

Simple example

std::stringstream stream;
stream << "Seek: " << event.GetInt();
std::string log = stream.str();
author MCPBot sitemap