NULL == 0? [英] NULL==0?

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

问题描述




这些是等价的:


char text [];


if(text == NULL){}

if(text == 0){}


谢谢,

Q

Hi,

Are these equivalent:

char text[];

if(text==NULL){}
if(text==0){}

Thank you,
Q

推荐答案



" Quantum" < no ***** @ address.comWrote in message

news:6N ****************** @ newsfe1-gui.ntli。 net ...

"Quantum" <no*****@address.comwrote in message
news:6N******************@newsfe1-gui.ntli.net...




这些是等价的:


char text [];


if(text == NULL){}

if(text == 0){}

>
谢谢,

Q
Hi,

Are these equivalent:

char text[];

if(text==NULL){}
if(text==0){}

Thank you,
Q



虽然它来自C faq它解决了你的问题
http://c-faq.com/null/index.html


Serafeim

Although it''s from the C faq it addresses your question
http://c-faq.com/null/index.html

Serafeim


Papastefanos Serafeim写道:
Papastefanos Serafeim wrote:

" ;量子" < no ***** @ address.comWrote in message

news:6N ****************** @ newsfe1-gui.ntli。 net ...
"Quantum" <no*****@address.comwrote in message
news:6N******************@newsfe1-gui.ntli.net...

>

这些是等价的:

char text [];

if(text == NULL){}
if(text == 0){}

谢谢,
Q
>Hi,

Are these equivalent:

char text[];

if(text==NULL){}
if(text==0){}

Thank you,
Q



虽然它来自C faq它解决了你的问题
http://c-faq.com/null/index.html

Serafeim


Although it''s from the C faq it addresses your question
http://c-faq.com/null/index.html

Serafeim



好​​的,谢谢。 :)

Q

Ok, thanks. :)
Q


Quantum写道:
Quantum wrote:

这些是等价的:


char text [];


if(text == NULL){}

if(text == 0){}
Are these equivalent:

char text[];

if(text==NULL){}
if(text==0){}



是的,但是,因为text是一个数组,它永远不会是NULL ...

-

Nick Keighley

yes, but, since text is an array it can never be NULL...
--
Nick Keighley


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

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