1// to_string example
2#include <iostream> // std::cout
3#include <string> // std::string, std::to_string
4
5int main ()
6{
7 std::string pi = "pi is " + std::to_string(3.1415926);
8 std::string perfect = std::to_string(1+2+4+7+14) + " is a perfect number";
9 std::cout << pi << '\n';
10 std::cout << perfect << '\n';
11 return 0;
12}