I work in C++, and I found some library, named "graphics.h". When I ran example code (I am a beginner in this library)
#include "graphics.h"
int main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "");
circle(250, 200, 50);
getch();
closegraph();
return 0;
}
I get an error (Visual Studio 2019). Error is: '(E0100) duplicate parameter name' in graphics.h file. I found, that one function is defined like that:
void printimage(
const char* title=NULL,
double width_inches=7, double border_left_inches=0.75, double border_top_inches=0.75,
int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX,
bool active=true, HWND hwnd=NULL
);
Look at the twice written int right
. How can I repair it?
Also, I get the error in the example code: (E0167) 'argument of type "const char*" is incompatible with parameter of type "char *"'. Note, that I am just a beginner, so I don't know so much about char
s and pointers.
I also get errors in graphics.h: 1. '(C2086) 'int right': redefinition', 2. '(C2664) 'void initgraph(int *,int *,char *)': cannot convert argument 3 from 'const char [1]' to 'char *'.
Am I the only one, who is having errors, or it is something bigger there?
Thank you for your effort !
Edit: I found some note on the library code: // * This library is still under development. and // * This library may not be compatible with 64-bit versions of Windows
I have no luck because I have 64-bit Windows 7 Professional.