On 7/21/07, Milan Padh <[EMAIL PROTECTED]> wrote:
> I Get some Problem In Foor Loop ( C)
>
> #include<stdio.h>
> #include<conio.h>
Don't rely on conio.h, it's not standard and won't work in other
compilers outside Turbo C
> void main()
use int main()
> {
> int x;
> clrscr();
Not standard, and if you move to another compiler it won't work
> for(x=10; x>=0; x- -)
You mean x-- here, x- - is invalid
> printf("%d\t",x);
> gethch();
I think gethch() is not a valid function call even with conio.h
> }
> So This Code I Get Error On Turbo C
> The For Loop Not desincrement
> so This Matter I Hope You Help Me
Yes, the decrement operator is --, not - -
You should stop using Turbo C and use something newer. There are free
compilers you can get that work on Windows. You will find a list of
them on the Yahoo site for this group, under 'Links'
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi