turbo c graphics没有错误但不运行

f0brbegy  于 2023-04-19  发布在  其他
关注(0)|答案(1)|浏览(97)

下面的代码没有任何错误,但它不会运行。当我运行它时,屏幕上只有一个 Flink 。它不提供任何输出。我必须做什么?

#include<graphics.h>
#include<conio.h>

void main()
{
    int gd = DETECT, gm;
    initgraph (&gd, &gm, "");
    setbkcolor (15);
    setcolor (0);
    settextjustify (1,1);
    settextstyle (3,0,12);
    outtextxy (getmaxx()/2, 1, "BATAAN PENINSULA STATE UNIVERSITY");
    outtextxy(getmaxx()/2, 3, "MAIN CAMPUS");
    settextstyle (3,0,10);
    outtextxy (getmaxx()/2, 5, "College of Engineering and Architecture");
    outtextxy (getmaxx()/2, 7, "Bachelor of Science in Civil Engineering(BSCE)");
    settextstyle (3,0,15);
    outtextxy (getmaxx()/2, getmaxy()/2, "COMPUTERIZED TUTORIAL SYSTEM");
    outtextxy (getmaxx()/2, 30, "(CORRECTION IN TAPING)");
    settextstyle (3,0,10);
    outtextxy (getmaxx()/2, getmaxy(), "Programmed by: BSCE-3A Group 8");

    getch();
    closegraph();
}
fbcarpbf

fbcarpbf1#

在initgraph中,你的“”是空的。它们应该有bgi库的路径。它应该看起来像这样:

initgraph(&gd, &gm, "C:\\TC\\BGI");

相关问题