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
I faced the same issue. Did you download WinBGIm library from its website?
If yes, then the header files graphics.h
and winbgim.h
have a bug. On line 302, of each of those files, replace right = 0
with top = 0
.
But, then the problem is the library itself was built using the "buggy" header files, so:
So, now if you put the corrected files (header files as well as the library), in the target folders and re-build, the program should not crash.