I have just started graphics in C++ and was making a simple program to create a rectangle but no output screen is coming even though i have used getch(). can someone please tell me what i am doing wrong.
#include<graphics.h>
#include<conio.h>
void main()
{
int gm=0,gr=0;
initgraph(&gm,&gr,"");
cleardevice();
rectangle(100,100,300,300);
getch();
closegraph();
}