程序如下:#include<graphics.h> main() {int gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,"c:\\tc"); cleardevice(); moveto(160,120); lineto(480,120); lineto(160,360); lineto(160120); getch(); closegraph(); } 運行結(jié)果如下:ompiling...畫矩形.cppf:\畫矩形.cpp(1) : fatal error C1083: Cannot open include file: 'graphics.h': No such file or directoryError executing cl.exe.
2 回答

叮當(dāng)貓咪
TA貢獻(xiàn)1776條經(jīng)驗 獲得超12個贊
graphics.h
vc里面沒有這個頭文件的
最好有tc2.0試試,tc里很多函數(shù)和頭文件在vc里是不被包含的。
- 2 回答
- 0 關(guān)注
- 284 瀏覽