Mail Archives: djgpp/2003/03/04/07:45:41
Graham Rounce (graham AT rounce DOT freeserve DOT co DOT uk) wrote:
: Can anyone please tell me why textcolor isn't working, and ScreenGetCursor
: seems to return y and y instead of x and y?
: The prog below prints "hello" 16 times all in the same color, then "11 11".
: #include <stdio.h>
: #include <pc.h>
: main() {
: int i,*x,*y;
x and y point anywhere.
: for (i=0;i<16;i++) {
: textcolor(i);
: printf("\nhello");
: }
: ScreenSetCursor(5,11);
: ScreenGetCursor(x,y);
Here you let ScreenGetCursor() overwrite whatever x and y point to.
: printf("%d %d",*x,*y);
: }
Right,
MartinS
- Raw text -