这合法吗? [英] Is it legal?
问题描述
你好,
写合法是否合法
printf("%+ *。* f",5,0, A [r] [c]);
而不是
printf("%+ 5.0f",A [r] [ c]);
感谢
xhungab写道:
< blockquote class =post_quotes>
你好,
写合法是否合法
printf("%+ *。 * f",5,0,A [r] [c]);
而不是
printf("%+ 5.0 f,A [r] [c]);
感谢
嗨!
是的,例如GNU C库,如
http://www.gnu.org/software/libc/man...atted%20Output 。
但他们也说其他C库版本可能无法识别这种语法。
康斯坦丁
你好,
写合法是否合法
printf(" %+ *。* f",5,0,A [r] [c]);
而不是
printf(" ;%+ 5.0f",A [r] [c]);
感谢
你的意思是+在里面 ?看起来很讨厌。你为什么要这样做?
这样做?
尝试在C90 / C99模式下调用编译器,具体取决于你想要的
标准坚持,并启用严格/迂腐模式。
Sh
Schraalhans Keukenmeester写道:
xhungab写道:
>你好,
写作是否合法
printf("%+ *。* f",5,0,A [r] [c]);
而不是
printf(" %+ 5.0f",A [r] [c]);
感谢
你的意思是+中的+?看起来很讨厌。你为什么要这样做?
这样做?
尝试在C90 / C99模式下调用编译器,具体取决于你想要的
标准坚持,并启用严格/迂腐模式。
Sh
+有什么问题?
kmi
Hello,
Is it legal to write
printf(" %+*.*f",5,0,A[r][c]);
Instead of
printf(" %+5.0f",A[r][c]);
Thank
xhungab wrote:
Hello,
Is it legal to write
printf(" %+*.*f",5,0,A[r][c]);
Instead of
printf(" %+5.0f",A[r][c]);
ThankHi!
Yes it is for example with GNU C library as said in
http://www.gnu.org/software/libc/man...atted%20Output.
But they also say "Other C library versions may not recognize this syntax."
Konstantin
xhungab wrote:Hello,
Is it legal to write
printf(" %+*.*f",5,0,A[r][c]);
Instead of
printf(" %+5.0f",A[r][c]);
Thank
You mean with the + in it ? Looks yucky anyways. Why would you want to
do this like that?
Try invoking your compiler in C90 / C99 mode, depending on which
standard you want to adhere to, and enable strict/pedantic mode.
Sh
Schraalhans Keukenmeester wrote:
xhungab wrote:>Hello,
Is it legal to write
printf(" %+*.*f",5,0,A[r][c]);
Instead of
printf(" %+5.0f",A[r][c]);
Thank
You mean with the + in it ? Looks yucky anyways. Why would you want to
do this like that?
Try invoking your compiler in C90 / C99 mode, depending on which
standard you want to adhere to, and enable strict/pedantic mode.
ShWhat is wrong with the + ?
kmi
这篇关于这合法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!