Menu

printf("%.0f %",float_var); ERROR

2003-02-16
2012-09-26
  • Nobody/Anonymous

    someone knows why don't show the last %?

     
    • Nobody/Anonymous

      why dont people search google beofer asking such a simple question...

      Zero Valintine

       
    • Curtis Sutter

      Curtis Sutter - 2003-02-17

      I believe you will need a \ infornt of the % since the % is something important.  Kinda like having \" \' \\ when showing those characters.

      Curtis

       
    • Ondrej Majerech

      Ondrej Majerech - 2003-02-17

      Jes, but not \, but another % so - printf ("%.0f %%", float);

       
    • Curtis Sutter

      Curtis Sutter - 2003-02-18

      Ok, I am just always using C++ with the \ excape char and not C with the % excape char.  Thanks for letting me know.  I will try to remember in the future.

      Curtis

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.