[英] out

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

问题描述

#include< stdio.h>


int out(int n,char * buffer){

if(n =(int)NULL ){

返回看跌期权(缓冲区);

}

如果(n = 1){

返回fputs (buffer,stdout);

}

if(n!= 1 || n!=(int)NULL){

fprintf( stderr,用法错误\ n);

返回0;

}

}


上面的代码之前我添加了int casts只是一个直觉,并没有
工作。通过在NULL之前添加int转换,我真的做了什么?

我希望写的是正确的。 int之前的代码将编译后的b / b
编译成目标文件,但编译器通过bash'的stderr给了我警告

我需要演员。我是否纠正了可移植性问题。即使它是正确的,也要知道你做了什么,这是不好的。




比尔

解决方案

vi******@gmail.com 写道:


4月6日凌晨2:19,Ian Collins< ian-n ... @ hotmail.comwrote:


这是一个巨魔吗?



正如我之前所说的,这个Bill Cunningham是一个巨魔。

然而很多人都不理我并继续回应.. 。



无论是巨魔还是完全无法学习该语言。这是一个完美的浪费时间来尝试对话。


Brian


Bill Cunningham写道:


>

我不知道0是否可携带。



0,不便携? 1或2怎么样?


-

Ian Collins。


Keith Thompson写道:


我们不会忽视你,我们只是不同意。我不相信他是故意的巨魔。他说他有某种学习障碍

但是他正试图学习C语言。我没有理由让b $ b不相信他。



他自2002年以来一直在学习C语言,并且没有比这更进一步的b
进步。如果他不是巨魔,那么每个人都需要意识到这不会发生。



Brian


#include <stdio.h>

int out(int n, char *buffer) {
if (n=(int)NULL) {
return puts(buffer);
}
if (n=1) {
return fputs(buffer,stdout);
}
if(n!=1||n!=(int)NULL) {
fprintf(stderr,"Usage error\n");
return 0;
}
}

The above code before I added the int casts just by a gut feeling didn''t
work. By adding the int casts in front of the NULLs what have I really done?
I hope the wrote the right thing. The code before the int casts compiled
into an object file but the compiler through bash''s stderr gave me warnings
that I needed casts. Have I corrected a portability problem. It''s not good
to guess things even if it''s right but to know what you did.

Bill

解决方案

vi******@gmail.com wrote:

On Apr 6, 2:19 am, Ian Collins <ian-n...@hotmail.comwrote:

Is this a troll?


As I said before, this Bill Cunningham person is a troll.
Yet a lot of people ignore me and continue to respond...

Either a troll or completely unable to learn the language. It''s a
complete waste of time to attempt a dialog.

Brian


Bill Cunningham wrote:

>
I didn''t know if 0 was portable or not.

0, not portable? How about 1 or 2?

--
Ian Collins.


Keith Thompson wrote:

We don''t ignore you, we merely disagree. I don''t believe he''s a
deliberate troll. He''s said he has some sort of learning disability
but is trying to learn C in spite of it. I''ve seen no reason to
disbelieve him.

He''s supposedly been learning C since 2002 or so, and has made no more
progress than this. If he''s not a troll, then everyone needs to realize
that it ain''t gonna happen.


Brian


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

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