hi all ;;
i'm so glade to join u ,,
i want ti ask about my problem in using borlandc++ 3.11 under windows vista home edition ,

i wrote the following program ..& i runs perfect on windows xp(on my desktop computer)
but while trying it on my laptop dell inispiron 1520 i get the following runtime error-
note .. i have checked graphics library in option/linker/libraries/graphic libraries.

(
borland c++ for dos
this system does not support fullscreen mode.choose 'close' to terminate the application.
                                                                      close      ignore

when i press ignore it comes again to me ,, when i press again - borland c++ hang

)

can anyone tell me how to fix this problem??
thanks in advance....
that include the following code:

#include <stdlib.h>
#include <stdio.h>
#include<iostream.h>
#include<graphics.h>
#include<conio.h>
class point
{
int x;
int y;
static int pointnum;

public:
static int getpointnum()
    {
    return pointnum;
    }

int getx()
    {
    return x;
    }

int gety()
    {
    return y;
    }


void setx(int n)
    {
    x=n;
    }
void sety(int m)
    {
    y=m;
    }

point()
    {
    x=y=0;
    pointnum++;
    cout<<"def. con. point";
    }

point(int n,int m)
    {
    x=n;
    y=m;
    pointnum++;
    cout<<"con. point";
    }

~point()
    {
    pointnum--;
    cout<<"dest. point";
    }

};

class rect
{
int color;
point ul;
point lr;
static int rectnum;

public:
static int getrectnum()
    {
    return rectnum;
    }

rect():ul(),lr()
    {
    color=0;
    rectnum++;
    }

rect(int x1,int y1,int x2,int y2,int c):ul(x1,y1),lr(x2,y2)
    {
    color=c;
    rectnum++;
    }

~rect()
    {
    rectnum--;
    }

void draw()
    {
    setcolor(color);
    rectangle(ul.getx(),ul.gety(),lr.getx(),lr.gety());

    }
};

int rect::rectnum=0;
int point::pointnum=0;
void main()
{
/* request auto detection */
int gdriver =DETECT, gmode, errorcode;

/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "c:\\bcpp\\bgi");

/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }

rect r(200,300,400,500,5);
r.draw();
getch();
closegraph();
}

>borlandc++ 3.11 under windows vista home edition
You might as well ask about the coal driven steam engine in your Ferrari while you're at it.

Do you have a reason why you are running borland c++ 3.11??

I can tell you that the program will not run on a computer that has no clue what DOS stretch mode is .

hi guys,, thanks for replying but really i'm in stage of learning c++ .. and the instructor asked me to use borland c++ as it is the worst compiler to deal with .. so i'm forced to use it ...
i hope anyone help me ,, and find answer to my problem & also tell me about a good compiler to use it .. thank uzzzzzzzzzzzzzzzzzzzz

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.