miltonbhowmick
miltonbhowmick

Reputation: 481

why not the drawing window open in c++ grahpics?

I have added winbgim.h and graphics.h to the include folder in the codeblock location. libbgi.a is also added to the lib folder.

Below code is to draw a cicle:

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

int main() {
    initwindow(300,300,"test");
    circle(100,100,100);
    getch();
    closegraph();
    return 0;
}

See the below picture, there is no circle drawn in the window:

image

What is the problem?

Upvotes: 2

Views: 1620

Answers (1)

Shivam Pandey
Shivam Pandey

Reputation: 11

  1. Try these files: https://github.com/SagarGaniga/Graphics-Library

  2. set your environment variable and check it (by typing gcc --version on cmd). For setting an environment variable:https://www.youtube.com/watch?v=GWJqsmitR2I (time snap : 4:32 to 5:47)

  3. still not working try to install the latest version of code blocks and perform steps 1 and 2 again.

Upvotes: 1

Related Questions