Here is a code I have written:
#include <iostream.h>
#include <conio.h>
#include <graphics.h>
void main ()
{
int gd,gm;
clrscr ();
detectgraph (&gd,&gm);
initgraph (&gd,&gm,"c:\\tc\\bgi");
outtext("\n\n\n Welcome to the graphics mode!!!");
getch ();
cleardevice ();
settextstyle (3,0,2);
outtext("Experimenting with fonts......");
getch ();
cleardevice ();
setcolor (5);
outtext("Experimenting with fonts......");
getch ();
cleardevice ();
settextjustify (1,1);
outtext ("Justification of text........");
if (graphresult () == -11)
outtext ("Error.....");
getch ();
}
Now, when I run this code, the settextjustify function does not align the text in the center of the screen. I have also tried the enumetations for the center alignment but still this thing doesn't work. Please help!!!!