如何使用boost.format输出百分号?

Dan*_*aum 14 c++ boost

如何使用Boost.Format输出百分号?

即:

boost::format msg("5% complete"); // <- how to actually output the percent sign
Run Code Online (Sandbox Code Playgroud)

谢谢!

Ken*_*nde 22

只需用另一个百分号逃脱它

boost::format msg("5%% complete"); 
Run Code Online (Sandbox Code Playgroud)