I have tried to learn about graphics using codeblocks , and have initialized the graphics header to my library , every graphics code builds and compiles , and shows :
Process returned -1073741819 (0xC0000005) execution time : 2.776 s
Press any key to continue.
but it doesn't show the graphic window. For example I have written a code to show lines, it doesn't show anything.
I tried this code at first, and it showed:
F:\Code blocks\Lab final\Graph.cpp|12|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
Here is the code:
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
int main() {
int gdriver = DETECT, gmode;
int x1 = 200, y1 = 200;
int x2 = 300, y2 = 300;
char driver[] = "";
initgraph(&gdriver, &gmode,driver);
line(x1, y1, x2, y2);
getch();
closegraph();
}
I expected to see the graphics window , but it doesn't show anything .
After trying a lot of sites I have found one from where downloading the files that can solve that issue , and for anyone that are facing the same problem , you can download the files from here and follow the steps from the read me file , and it will be solved .
And thanks to everyone who tried to help and replied to my question .