在 Turbo C 3.2 中,我得到了
Divide error
在代码块 IDE 中我收到错误
initgraph() and closegraph() are refrence at compile time. (I added graphics header and library file in folder of codeblocks).Please give me solution?
我写的代码是
#include<graphics.h>
int main()
{
int a=10,ab;
initgraph(&a,&ab,"C:\\TURBOC3\\BGI");
circle(100,200,20);
closegraph();
return 0;
}
最佳答案
除了路径中的反斜杠问题之外,您使用 3270 兼容显示器的可能性极。为什么不用a=0
传入a
的地址呢。 ab
必须设置为请求的模式,除非您将驱动程序设置为自动检测
,然后它将选择最高的可用模式。请参阅here .
关于c++ - C 和 C++ 中的图形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48076571/