outtext function displays text at current position.
Declaration :- void outtext(char *string);
Do not use text mode functions like printf, gotoxy etc while working
in graphics mode. Also note '\n' or other escape sequences do not work
in graphics mode. You have to ensure that the text doesn't go beyond the
screen while using outtext.
Declaration :- void outtext(char *string);
C programming code for outtext
#include<graphics.h> #include<conio.h> main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\\TC\\BGI"); outtext("To display text at a particular position on the screen use outtextxy"); getch(); closegraph(); return 0; }
No comments:
Post a Comment