こんにちは、C プログラミングで線を引くプログラムを書きました。私たちが知っているように、windows7/8 はフル スクリーンを直接サポートしていません。turboC++ からコンパイルすると正しく動作しましたが、ビルドして TurboC++ フォルダーに移動し、そこから実行すると、このプラットフォームではサポートされていないというメッセージが表示されます。フルスクリーンアプリをサポートしていますが、Windows 7/8で実行するにはどうすればよいですか. 私が書いたコードは次のとおりです。
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
clrscr();
/* request auto detection */
int gdriver = (DETECT)/3, gmode, errorcode;
int midx, midy;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "C:/TURBOC3/BGI/");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
midx = getmaxx() / 2;
midy = getmaxy() / 2;
setcolor(getmaxcolor());
line(midx, midy, midx/2,midy/2);
/* clean up */
getch();
closegraph();
return 0;
}
解決策は何ですか?私は C の初心者です... 明確にできなかったらごめんなさい... 私が得たエラーの写真も添付しました..