ostringstream
Ostringstream is an output stream class in the C++ standard library that writes formatted data into a string buffer. It is defined in the header <sstream> and resides in the std namespace. std::ostringstream is a typedef of std::basic_ostringstream<char>, used when data should be assembled into a string rather than written to an external device.
The class uses an internal string buffer to accumulate characters. Data inserted by operator<< is stored in
Usage typically involves creating an ostringstream, streaming values into it, and then extracting the resulting string
Compared with direct formatting, ostringstream offers type safety and integrates with locale and iomanip facilities provided