I had setup codeblocks for graphics programming. like I install winbgim file. and done other setup in the codeblocks linker setting. but when I ran a program like this
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
main(void) {
int gdriver = DETECT, gmode;
int x1 = 200, y1 = 200;
int x2 = 300, y2 = 300;
system("cls");
initgraph(&gdriver, &gmode, "");
line(x1, y1, x2, y2);
getch();
closegraph();
}
it did not run as I expected .the process returned by 0xc0000005 . and also the winbgi window did not opened. so plz help me to out of this problem