.exe file has stopped working.(graphics.h)

hello there!
im using codeblocks with mingw32 compiler(windows8 64 bit).i have downloaded and installed <graphics.h> corectly. the execution is perfect,if i just type this:\

#include<graphics.h>
#include<winbgim.h>

int main()
{}//the execution window appears correctly.

However, if i give some statements in the main(), the following box appears:
" prog.exe has stopped working.
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available. "

my code is to draw an arc:


#include<graphics.h>
#include<winbgim.h>

int main()
{
int gd=DETECT;
int gm;
initgraph(&gd,&gm,"C\\TC\\BGI");

arc(200,200,0,130,50);

getch();
closegraph();
}

pl. do help me out.
thanks :)
Topic archived. No new replies allowed.