Structure of Graphics Program

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
    int gd=DETECT,gm;
//gd=graphics driver, gm=graphics mode
//You can choose any other variable name.
//DETECT is a macro defined in “graphics.h”
//We have passed three arguments to initgraph.
    initgraph(&gd,&gm,"C:\\TC\\BGI");
//initgraph=initialization of graph
//Location of BGI folder, where display files are saved. 
//Write the location of (C-TC-BGI)
    ………...........
    ………...........
    getch();
    closegraph();

No comments:

Post a Comment