图形库中的CodeBlocks错误 [英] CodeBlocks error in graphics library

查看:351
本文介绍了图形库中的CodeBlocks错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代码块中执行了以下代码IDE -

I executed the following code in codeblocks IDE-

#include <iostream>
#include <graphics.h>
using namespace std;

int main()
{
    int gd = DETECT, gm;
    initgraph(&gd, &gm, "C:\TC\BGI");
    line(100, 200, 150, 250);
    cout << "Hello world!" << endl;

    return 0;
}

并且在调试时我的代码停止在graphics.h

and while debugging my code stopped at this point in graphics.h

int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX,

推荐答案

您在graphics.h中在此行上设置两次:

You are setting right twice on this line in graphics.h:

int right = 0,int right = INT_MAX

将行更改为:

int left = 0,int top = 0,int right = INT_MAX,int bottom = INT_MAX

这篇关于图形库中的CodeBlocks错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆