怀疑 [英] c doubt

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

问题描述



i尝试使用这个简单的代码

int array [],i;

for(i = -1; i< = sizeof(array); i ++)

但条件是失败的,即使数组大小也大于

零。

你可以帮我吗.............

解决方案

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




i尝试使用这个简单的代码

int array [],i;

for(i = -1; i< = sizeof(array); i ++)



你的编译器没有警告你关于无量纲数组吗?


>

但条件是失败的,即使数组大小也大于

零。



想想sizeof的结果,是签名还是无符号类型?


你能不能帮助我.............


$ b $不再在这里发布了。


-

Ian Collins。


" Ian Collins"写了

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


> hi,
我尝试使用这个简单的代码
int array [],i;
for(i = -1; i< = sizeof(array); i ++)



你的编译器没有警告你关于无量纲数组吗?


>>
但条件失败总是偶数组大小大于零。



想想sizeof的结果,是签名还是无符号类型?


>你可以帮我.......


$ b $不再在这里发帖了。



提出两个问题,然后指示不回复。一个人想知道为什么你打扰他们的b $ b。 。 。


-

Craig Franck
cr ********** @ verizon.net

Cortland,NY


Craig Franck写道:


" Ian Collins"写了


>> sw *************** @ gmail.com写道:


>>> hi,
我试过这个简单的代码
int array [],i;
for(i = -1; i< = sizeof(array); i ++)


您的编译器是否警告过无量纲数组?


>>>但条件失败,即使数组大小也大于零。


想想sizeof的结果,是签名还是无符号类型?


>>>你可以帮我.......

$ b $不再在这里发帖了。



提出两个问题,然后指示不回复。一个人想知道为什么你打扰他们的b $ b。 。 。



原谅?这些问题旨在将OP指向正确的方向。提示通常比提供直接答案更好。


我没有回答任何回复。在技​​术性的Usenet小组上使用愚蠢的缩写是不合适的。


-

Ian Collins。


hi,
i tried with this simple code
int array[],i;
for(i=-1;i<=sizeof(array);i++)
but the condition is failing always even array size is greater than
zero.
can u help me.............

解决方案

sw***************@gmail.com wrote:

hi,
i tried with this simple code
int array[],i;
for(i=-1;i<=sizeof(array);i++)

Didn''t your compiler warn you about a dimensionless array?

>
but the condition is failing always even array size is greater than
zero.

Think about the result of sizeof, is it a signed or an unsigned type?

can u help me.............

u doesn''t post here any more.

--
Ian Collins.


"Ian Collins" wrote

sw***************@gmail.com wrote:

>hi,
i tried with this simple code
int array[],i;
for(i=-1;i<=sizeof(array);i++)

Didn''t your compiler warn you about a dimensionless array?

>>
but the condition is failing always even array size is greater than
zero.


Think about the result of sizeof, is it a signed or an unsigned type?

>can u help me.............

u doesn''t post here any more.

Ask two questions, and then instruct not to reply. One wonders
why you bothered. . .

--
Craig Franck
cr**********@verizon.net
Cortland, NY


Craig Franck wrote:

"Ian Collins" wrote

>>sw***************@gmail.com wrote:

>>>hi,
i tried with this simple code
int array[],i;
for(i=-1;i<=sizeof(array);i++)


Didn''t your compiler warn you about a dimensionless array?

>>>but the condition is failing always even array size is greater than
zero.


Think about the result of sizeof, is it a signed or an unsigned type?

>>>can u help me.............

u doesn''t post here any more.


Ask two questions, and then instruct not to reply. One wonders
why you bothered. . .

Pardon? The questions were intended to point the OP in the right
direction. It''s often better to hint than to give a direct answer.

I said nothing about not replying. The use of silly abbreviations is
inappropriate on a technical Usenet group.

--
Ian Collins.


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

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