#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>

int main()
{
    std::ostringstream oss;

    oss << "The answer is: ";
    oss << 42;
    oss << ", and this is a double: ";
    oss << 3.14;
    oss << ". " << std::endl;
    oss << "Oh, btw, you can also output booleans: ";
    oss << std::boolalpha << true;
    oss << ". See? It's easy!" << std::endl;

    std::cout << oss.str();
}