What can I do if code::blocks shows error when I t

2019-03-07 02:15发布

问题:

Today I tried to write a code using graphics.h in code::blocks. But instead of showing appropriate result, it showed "no such file or directory". But, isn't graphics.h is one of the header file of c/c++? So, if there is any solution, tell me what to do so that I can use it in code::blocks. Or, if you have any other better substitutive idea, it is sure to be appreciated.

回答1:

Graphics.h is not a part of Standard C++. It is the main header for the Borland Graphics Library that originated with Borland C about 30 years ago. It has been obsolete for about 20 years.

C++ doesn't officially recognize the existence of pixels, so you need an external library to do graphics. It's against the rules to for me to do this, so don't tell anyone, but take a look at SDL.