How do I change the text color in a C program that runs in DOS?
And
How do I use goto's in C
Thanks,
Patrick Blochle
How do I change the text color in a C program that runs in DOS?
And
How do I use goto's in C
Thanks,
Patrick Blochle
For the text color Q, i saw this Q in other post in this site, a search should help.
For the goto Q, i don't know the rest but i read from somewhere, saying that goto should not be used. This is unstructured programming.
Can't help, sorry..
for my guess (i dont know whether this is true)Originally posted by FCF
For the goto Q, i don't know the rest but i read from somewhere, saying that goto should not be used. This is unstructured programming.
Can't help, sorry..
you know there's a number beside that you can enter the code on the pad? well for eg:
001 | #include <stdio.h>
002 | ....
003 | ....
004 | ....
005 | ...
006 | ....
007 | goto (006);
that mean it will loop and run the statement of code which is located at 006.
or ...
you need to set the definition :
#include <stdio.h>
..
..
..
start;
..
..
..
goto (start);
..
..
For various musings on the goto - click yonder link: http://www.cprogramming.com/cboard/s...highlight=Goto
Colors - http://www.cprogramming.com/cboard/s...ht=text+colour
Money frees you from doing things you dislike. Since I dislike doing nearly everything, money is handy - Groucho Marx
>>How do I use goto's in C
If you don't know how to, then you most certainly don't need to. Use another method to control your program flow.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]