Browse » Home
»
filled colored rectangle in c
» C graphics programm to draw a filled colored rectangle
C graphics programm to draw a filled colored rectangle
C graphics programm to draw a filled colored rectangle
#include <graphics.h>
#include <conio.h>
void main()
{
int d,m;
int left, top, right, bottom;
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
left = getmaxx() / 2 - 50;
top = getmaxy() / 2 - 50;
right = getmaxx() / 2 + 50;
bottom = getmaxy() / 2 + 50;
setfillstyle(1,4);
rectangle(left,top,right,bottom);
floodfill(getmaxx()/2,getmaxy()/2,15);
getch();
closegraph();
}
Output :
Subscribe to:
Post Comments (Atom)
5 comments:
no output just showing undefined symbol to getmax
Just put #include and #include
Linker Error: undefined symbol _closegraph in module CAL.cpp can anyone say what prblm is this
Firstly save your program in .c
After that , go to options>linker>libaries>then tick on graphics library and container class..
This should do
It works
Thanks 👍👍😌👍😌👍
Post a Comment