这合法吗? [英] Is it legal?

查看:78
本文介绍了这合法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


写合法是否合法


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库版本可能无法识别这种语法。


康斯坦丁


xhungab写道:


你好,


写合法是否合法


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]);

Thank

Hi!

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.

Sh

What is wrong with the + ?

kmi


这篇关于这合法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆