在本教程 site 中,我将下面的代码作为 .c 文件运行,
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
void main(void) {
int gdriver = DETECT, gmode;
int x1 = 200, y1 = 200;
int x2 = 300, y2 = 300;
clrscr();
initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");
line(x1, y1, x2, y2);
getch();
closegraph();
}
不幸的是,我遇到了这个错误
[Error] sstream: No such file or directory
从这个 site 开始,我将代码保存在 .cpp 文件中并成功运行,没有任何错误。但是,没有图形绘制显示,它只出现命令提示符。这个 link 也不起作用。请问,有什么解决方法可以让它工作。
注意:我使用的是 TDM-GCC 4.9.2 64 位版本