PDA

Click to See Complete Forum and Search --> : % sign


Stockton.S
May 24th, 2001, 05:06 AM
sprintf(Percentage, "Completed - %5.2f %",(Value/Max)*100);

How do I get the second % sign to go into my string?

Jop
May 24th, 2001, 02:59 PM
Not sure, but I guess you should use the escape character (\)

So that would be


sprintf(Percentage, "Completed - %5.2f \%",(Value/Max)*100);

parksie
May 24th, 2001, 04:23 PM
% is _vsnprintf specific so try %%. (it's not escaped by the compiler)