How can I compile and run programs using graphics.h in code::blocks?
I am new to code::blocks, so I was wondering how could I compile and run开发者_高级运维 my computer graphics animation programs (those that use graphics.h
) in Code::Blocks.
Is this possible with the default installation?
This is impossible. You can't use graphics.h
without a time machine, so you're better off forgetting about it altogether. This question gets asked about once a week, and the consensus is always the same.
The graphics.h
header is a proprietary graphics library included with Borland compilers back in the early 1980s. It is not a standard C or C++ library, and hasn't been modern or relevant for at least 20 years. It should come as no surprise that it does not work with modern compilers, or on modern operating systems. Using or learning to use it is an utter and complete waste of time. If your educational system is insisting upon you doing so, you should be entitled to a complete refund of your tuition.
It's good that you're moving up to a modern IDE like Code::Blocks. You should also upgrade your library and toolkits while you're at it. If you want to write graphics applications, you're undoubtedly going to be doing so in a graphical environment like Windows or X. You might as well learn the way to do it there, rather than getting lines to appear in an MS-DOS emulator and marveling at the appeal of retro tech.
精彩评论