You can not. You just write a string to the stream.
If you want to specify some additional line formatting (for example, right alignment with a space), you can use the setfill(' ') I / O setfill(' ') (specify a fill character with a space character) and setw(length) (set the output width). If you want something that mimics the syntax of C style style strings, you can use Boost.format .
std::cout << boost::format("%s") % "SomeStringValue";
source share