Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to output a percent sign itself using boost.format?

Tags:

c++

boost

How do you output a percent sign itself using Boost.Format?

i.e:

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

Thanks!

like image 543
Dan Nissenbaum Avatar asked Nov 26 '12 17:11

Dan Nissenbaum


1 Answers

Simply escape it with another percent sign

boost::format msg("5%% complete"); 
like image 170
Ken Wayne VanderLinde Avatar answered Oct 04 '22 23:10

Ken Wayne VanderLinde