On Thu, May 8, 2008 at 11:50 AM, pragya_13 <[EMAIL PROTECTED]> wrote:
> good day to every one
> plz tell me what is the use of using this array in the program????
> means what it actually represent & what's the use of using this
> array in program........
> int array[]={540,220,590,570,320,490,270,540,220}
Going by the code below, it doesn't look like it's being used for anything.
>
> *********************************************************************
> /*program is for printing a rectangle...*/
>
> #include<stdio.h>
> #include<conio.h>
> #include<graphics.h>
> main()
> {
> int gd=DETECT,gm,x,y;
> int array[]={540,220,590,570,320,490,270,540,220};/*????????*/
> initgraph(&gd,&gm,"c:\\tc\\bgi");
> x=getmaxx();/*?????????*/
> y=getmaxy();/*?????????*/
>
> rectangle(x/30,y/20,x/5,y/4);
>
> getch();
> }
> *****************************************************************
>
>
> and plz also tell me that what is the use of getmaxx and getmaxy..
This code makes use of the very old and very outdated Borland Graphics
Interface (BGI), which is for use on old DOS machines using the very
old and very outdated Borland C++ and Turbo C++ compilers. The
function calls in question determine the maximum x and y resolution of
the screen.
However... as has been expressed an uncountable number of times on
this list as well as in the welcome message you should have recieved
when signing up, questions regarding Turbo C++ and BGI and only going
to get replies of "Upgrade your compiler".
So... upgrade your compiler. Get rid of Turbo C++ and get one of the
many modern compiler development environments, such as Microsoft
Visual C++ Express or wxDevC++ -- both are free and can be used for
console (command-line) programs as well as GUI programs.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi