I encountered an issue while using the graphics.h library in my project. Specifically, I received an "undefined function" error when trying to use getmaxheight(). This function does not seem to be recognized by the library, which is causing problems with the functionality of my program.
Steps to Reproduce:
Use the graphics.h library in a C++ project.
Attempt to call the function getmaxheight() to retrieve the height of the graphics window.
Expected Behavior:
The function getmaxheight() should return the maximum height of the graphics window.
Actual Behavior:
The compiler produces an "undefined function" error for getmaxheight().
Proposed Solution:
It appears that getmaxheight() might not be available in the current implementation of graphics.h. Based on the documentation and other examples, using getmaxy() instead of getmaxheight() might resolve this issue. I have updated my code to use getmaxy() and it seems to work as expected.
Here’s a quick example of how to replace getmaxheight() with getmaxy() in your code:
Description:
I encountered an issue while using the
graphics.h
library in my project. Specifically, I received an "undefined function" error when trying to usegetmaxheight()
. This function does not seem to be recognized by the library, which is causing problems with the functionality of my program.Steps to Reproduce:
graphics.h
library in a C++ project.getmaxheight()
to retrieve the height of the graphics window.Expected Behavior:
The function
getmaxheight()
should return the maximum height of the graphics window.Actual Behavior:
The compiler produces an "undefined function" error for
getmaxheight()
.Proposed Solution:
It appears that
getmaxheight()
might not be available in the current implementation ofgraphics.h
. Based on the documentation and other examples, usinggetmaxy()
instead ofgetmaxheight()
might resolve this issue. I have updated my code to usegetmaxy()
and it seems to work as expected.Here’s a quick example of how to replace
getmaxheight()
withgetmaxy()
in your code: