tags:

views:

244

answers:

1

Hi,

I am getting this compiler (gcc 4.5) warning: `

> Formatter.cpp:23: warning: unknown
> conversion type character ‘"’ in format

And this is my code at line 23:

dprintf (fd, "<svg width=\"100%\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"&gt;");

I can't spot what am I doing which causes the warning. Can someone please help me?

Thank you.

+6  A: 

You need to escape all occurences of % - the printf family of function treats them as format specifiers and tries to parse the next character (for instance as in %s). You escape them by doubling (%%).

Alexander Gessler