Unable to save graphics.h

I have downloaded graphics.h from http://winbgim.codecutter.org/ following the instructions from http://rekursed.blogspot.com/2012/03/how-to-include-graphicsh-in-codeblocks.html and i got the following error when trying to compile the graphics program:
1
2
   redefinition of int right
   int right was already declared

because of the following code
 
    int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX

so i changed the first right to to top as specified in http://rekursed.blogspot.com/2012/03/how-to-include-graphicsh-in-codeblocks.html like so
 
    int left = 0, int top=0,int right=INT_MAX, int bottom=INT_MAX

but i recieve the following error
 
    <graphics.h directory> cannot be saved

so i cannot edit the file to fix it. If someone may help me fix this problem. In http://rekursed.blogspot.com/2012/03/how-to-include-graphicsh-in-codeblocks.html, a person specified fixing it with a text editor if that helps. Also let me know if i have posted this in the wrong forum, please tell me so that i may be able to fix this problem. Thank you.
the best solution is to not use graphics.h
Yeah, the best solution is to not use it. I'm guessing you're right about the first being int top = 0 though.
1
2
3
4
5
6
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
    );
Last edited on
Topic archived. No new replies allowed.