Moving your name on screen in Computer Graphics


If you have WindowXP  then set this path  "c:\\tc\\bgi".
  
Why this path we are set?
 because we set BGI  file ,that is graphical file.
In short we are just set the path of "BGI" folder 

Write down given below code.
 
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#include<stdio.h>

void main() 
{
    int getdevice=DETECT,getmode,i=1,c,x,y;
   initgraph(&amp;getdevice,&amp;getmode,"c:\\turboc3\\bgi"); 
    while(i)
    {
        if(kbhit())
        {
              break;
        }
        x=random(getmaxx());
        y=random(getmaxy());
        c=random(getmaxcolor());
        settextstyle(4,0,5);
        cleardevice();
        setcolor(c);
        outtextxy(x,y,"Hitesh Rupchandani");
        delay(1000);
    }

    getch();
    closegraph();
}

Here my name Hitesh Rupchandani so you can add your name.
after save program with '.c' extension.
for example myname.c

ALT +  F9  through COMPILE program.


CTRL + F9   through RUN program.


Now see the moving your name in screen

Find your .exe file of this program and other program

Go in My Computer .

In search box  'programname.exe'

for example myname.exe 



If you have any error or query ,you will ask me.

Thank you for read my post .