You are here

outtext function

outtext function displays text at current position.

Declaration :- void outtext(char *string);

C programming code for outtext

   int gd = DETECT, gm;
   initgraph(&gd, &gm, "C:\\TC\\BGI");
   outtext("To display text at a particular position on the screen use outtextxy");
   return 0;

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.