-1

I'm working on a program that calculates the Recaman Sequence. I'm trying to graph it by drawing arcs like in numberphile.

I've searched YouTube and there are videos on graphics.h. However, I've heard graphics.h is outdated. Is there a new thing similar to that? Is there another method, or should I try to install graphics.h? Also, I'm running this on a Windows 10 computer.

genpfault
  • 51,148
  • 11
  • 85
  • 139
programmerRaj
  • 1,810
  • 2
  • 9
  • 19

1 Answers1

0

Install Dev c++. Download these files:

https://github.com/SagarGaniga/Graphics-Library

Copy graphics.h and winbgim.h in

C:\Program Files (x86)\Dev-Cpp\MinGW64\include
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include

Copy libbgi.a in

C:\Program Files (x86)\Dev-Cpp\MinGW64\lib
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib

Run Dev c++ and create new project. Then in menu > project > project option > parametrs tab: Copy following in linker box and then ok:

-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32

Test code:

#include <graphics.h>

    int main( )
    {
        initwindow(400, 300, "First Sample");
        circle(100, 50, 40);
        while (!kbhit( ))
        {
            delay(200);
        }
        return 0;
    }
Darwin
  • 1,695
  • 1
  • 19
  • 29
  • I abandoned this project, so I'm not going to try out your solution, sorry. Hopefully your answer will help others who come to this question. – programmerRaj Jun 18 '21 at 14:33