I am having trouble using graphics.h in code blocks.
I have installed winbgi. Edited 302nd line. Linked lib file and all that stuff is done. So, I don't have any error regarding graphics header file.
But whenever I run/build any code involving graphics functions, windows gives an error ".. has stopped working". How to fix this?
I am using Codeblock v16. Windows 7ultimate - 64bit.
Here is my code:
#include<graphics.h>
int main() {
int gd = DETECT,gm;
initgraph(&gd, &gm, "c:\\tc\\bgi");
line(80, 100, 100, 100);
getch();
//return 0;
}
screenshots: