- getmaxx() function is used to fetch the maximum X coordinate for the current graphics mode or driver. You can learn about graphics mode and graphic driver in chapter Let’s Start.
- Selection of the graphics mode and graphics driver is depending upon the adapter or monitor presents in the user’s computer.
- For better understanding go through the program:
int gd=DETECT, gm, x;
sprintf(a,” maximum X coordinate for current graphics driver and graphics mode is %d”,x);
The above program is used to find the maximum X coordinate for the chosen graphics mode and graphics driver. In the program getmaxx() function is used to fetch the maximum X coordinate and then store it into the integer type variable x.The above program will give the following output after execution: