Re: I cant do change string to int.
- From: santosh <santosh.k83@xxxxxxxxx>
- Date: Sun, 11 Nov 2007 23:52:06 +0530
In article <871wawzm9a.fsf@xxxxxxxxx>, Ben Bacarisse
<ben.usenet@xxxxxxxxx> wrote on Sunday 11 Nov 2007 11:40 pm:
santosh <santosh.k83@xxxxxxxxx> writes:
In article <1194802445.381563.324660@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,<snip>
emre esirik(hacettepe computer science and engineering)
<emreesirik@xxxxxxxxx> wrote on Sunday 11 Nov 2007 11:04 pm:
int z=0;
<snip>z=1;
this is my code, I want to enter like this 3X^1+32X^4+12X^0 but
its
only do if part which if z==0 but why it doesnt do 'else' part????
Because 'z' is always zero. You initialise it to zero but no other
code changes it, so the if part of the if/else statement is always
executed.
there is a 'z=1;' in there. Proof, if it were needed, that good names
and good layout are important. The code is uninviting so I have not
had a look at it.
Ah yes. Good spot. However it comes _after_ the if/else construct so
it's of no consequence to it.
.
- Follow-Ups:
- Re: I cant do change string to int.
- From: James Kuyper
- Re: I cant do change string to int.
- References:
- I cant do change string to int.
- From: emre esirik(hacettepe computer science and engineering)
- Re: I cant do change string to int.
- From: Chris Dollin
- Re: I cant do change string to int.
- From: emre esirik(hacettepe computer science and engineering)
- Re: I cant do change string to int.
- From: santosh
- Re: I cant do change string to int.
- From: Ben Bacarisse
- I cant do change string to int.
- Prev by Date: Re: how to get dollars($) in c
- Next by Date: Re: simplebinary tree
- Previous by thread: Re: I cant do change string to int.
- Next by thread: Re: I cant do change string to int.
- Index(es):
Relevant Pages
|