Before start first program of C Graphics we need to understand its basic structure to write program. In C graphics basic unit is Pixel. and it has 640 column and 480 rows.
#include<stdio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd, &gm, "C://TC//BGI");
line(0,0,200,200);
getch();
closegraph();
}
| Brief Introduction of program. |
|---|

6 comments:
thanx it is very useful to understand structure of c graphics. Nice job. Keep it up...
it is not running in borland c++ 5.02 version
can u help me?
i think you have window 7 as operation system???
if you are using window 7 than i suggest you that you please use emulated turbo c for runnning graphics program.
To run graphics program in window 7 just visit this page Click Here.
nice work bro, keep going...,.,
Thanks for your feedback friend.
Post a Comment