how to solve codeblocks unable to run a graphics c program properly

-2

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

code-blocks
asked on Super User Apr 20, 2019 by Tushar Mia • edited Apr 20, 2019 by harrymc

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0