PDA

View Full Version : warning: unknown conversion type character '_' in format




Sean Kim
Jun 9, 2011, 07:35 PM
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



mfram
Jun 9, 2011, 08:16 PM
Take out the underbar. It shouldn't be there. Without it, the print should work fine.