• Have Any Question?
  • contact@eitworld.com

Getmaxx() Function





  • 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.

Declaration

int getmaxx();
  • For better understanding go through the program:

Program

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()

{

int gd=DETECT, gm, x;

char a[50];

initgraph(&gd,&gm,” “);

x=getmaxx();

sprintf(a,” maximum X coordinate for current graphics driver and graphics mode is %d”,x);

outtextxy(30,100,a);

getch();

closegraph();

}

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:

Output

c graphics



Real Time Web Analytics