warning: unknown conversion type character '_' in format

Discussion in 'Mac Programming' started by Sean Kim, Jun 9, 2011.

  1. macrumors newbie

    Joined:
    Jun 9, 2011
    #1
    I just start to learn objective-c.

    I tried one of example code form "http://www.otierney.net/objective-c.html"

    code:
    printf("%_f + %_fi", real, imaginary);

    compile:
    $ gcc -Wall -lobjc -framework Foundation ...

    warning:
    warning: unknown conversion type character '_' in format

    I don't know what is that underbar means.

    Thanks


    system info:
    i686-apple-darwin10-gcc-4.2.1
    mac osx 10.6.7
     
  2. macrumors 6502a

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #2
    Take out the underbar. It shouldn't be there. Without it, the print should work fine.
     

Share This Page