I already have graphics.h(and relevant files in MinGW ) but the programs are not working, because after build and run, I get required text output on output window but not the corresponding graphics because program_name.exe stops working. I already have searched all over the internet, StackOverflow is my final hope. I have been doing competitive programming in c+ +, just tried to get into graphics with c++ in code blocks.
#include <graphics.h>
#include <iostream>
using namespace std;
int main()
{ cout<<"a";
int gd= DETECT,gm ;
char driver[] = "";
initgraph(&gd, &gm, driver);
//initgraph(&gd,&gm," ");
circle (100,100,100) ;
getch();
closegraph();
return 0;
}