![]() |
printf and \" issue
Howdy,
Im using this line of code in a CGI program this line prints an empty hmtl cell. Code:
printf ("<TD width=\"40%\"> </TD>") the & n b s p ; is not showing up between the > < in the code tag /edit Well the thing is it compiled and worked fine using GCC on linux No im trying to compile it in ecpilse work space. as far as i know eclipse just uses the GCC compiler however on build it complains with this message. Unknown conversion type character `"' In line 236 ( the line post above) What confuses me is that it compiles/works on plain gcc and eclipse is complaining. Even while im using the escape char \ before the quote " char. Is this line of code wrong after all. ? |
Re: printf and /" issue
I have compiled that line of code in MSVC and Borland compiler and found no problem.
|
Re: printf and /" issue
:D cool
didn't know about borland , don't have it. Hmm leaves me with the question why eclipse don't accept it 8o |
Re: printf and /" issue
could be because of the % sign. I don't even know what the % sign is for printf, because usually putting a % sign denotes that you want to place a variables value here (e.g. %d for an integer) maybe some compilers find it ok, but some dont.
|
Re: printf and /" issue
Ahhh yes i get it... :|
The compiler is expecting a %d or %s etc etc. It finds %" invalid. But hmmm it should not take the " because the \ is in front. \" Or maybe it wants to use the last " sign as an input for the single % sign. /* think i'll sweep this problem under the eclips rug. |
Re: printf and /" issue
For an ANSI integrist, that line is incorrect.
It should be Code:
printf ("<TD width=\"40%%\"> </TD>") |
Re: printf and /" issue
:D wujo
|
All times are GMT +2. The time now is 22:39. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.