关于字符串的问题 [英] a question about a string
问题描述
我有一个字符串
长度为0.我从strlen(TE)得到它;
但是,如果我使用
if(TE!= NULL)
{
}
it总是进入这个循环。
strlen(TE)= 0表示TE = NULL吗?
非常感谢!
I have a string
the length is 0. I got it from strlen(TE);
however, if I use
if(TE!=NULL)
{
}
it always goes to this loop.
Does strlen(TE)=0 mean TE=NULL?
Thanks a lot!
推荐答案
QQ写道:
我有一个字符串
长度为0.我从strlen(TE)得到它;
然而,如果我使用
if(TE!= NULL)
它总是进入这个循环。
strlen(TE)= 0表示TE = NULL?
I have a string
the length is 0. I got it from strlen(TE);
however, if I use
if(TE!=NULL)
{
}
it always goes to this loop.
Does strlen(TE)=0 mean TE=NULL?
否,但这意味着* TE == 0(或者,如果你愿意,''\''')。
HTH,
--ag
< br $> b $ b -
Artie Gold - 德克萨斯州奥斯汀
http://goldsays.blogspot.com
除非你错过**否则你不能亲吻* ;
[* - 保持简单,愚蠢。 ** - 简单,愚蠢。]
No, but it means that *TE == 0 (or, if you prefer, ''\0'').
HTH,
--ag
--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com
"You can''t KISS* unless you MISS**"
[*-Keep it simple, stupid. **-Make it simple, stupid.]
TE == NULL和
$之间的区别是什么b $ b * TE == 0
?
what''s the different between
TE==NULL and
*TE==0
?
2006-02-21,QQ< ju *** *@yahoo.com>写道:
On 2006-02-21, QQ <ju****@yahoo.com> wrote:
之间有什么不同TE == NULL和
* TE == 0
what''s the different between
TE==NULL and
*TE==0
后者将第一个字符设置为零,实际上使字符串
为空"
The latter sets the first character to zero, in effect making the string
empty "".
这篇关于关于字符串的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!