The default fill character for a stream s
is s.widen(' ')
according to 27.5.5.2 [basic.ios.cons] paragraph 3/Table 128. What character results from s.widen(' ')
is, however, dependent on the std::locale
as s.widen(c)
is (27.5.5.3 [basic.ios.members] paragraph 12):
std::use_facet<std::ctype<cT>>(s.getloc()).widen(c)
BTW, you should use std::ostringstream
when you are only writing to the stream and there is no use of std::endl
ever.