I had setup the graphics file necessary for the execution of the graphics code in CodeBlocks from the following sites:-
http://www.codewithc.com/how-to-include-graphics-h-in-codeblocks
then I tried this sample code.
#include <graphics.h>
int main( )
{
initwindow(400, 300, "First Sample");
circle(100, 50, 40);
while (!kbhit( ))
{
delay(200);
}
return 0;
}
but when I Run the code in code blocks I get this
Can anyone resolve my problem?
This is because graphics.h
is Borland's BGI graphics library from 1989, developed for 16 bit MS DOS computers. But you are using a 64 bit Windows computer.
Solution: don't use 28 years old, non-standard libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With