plz help i have prblm in Borlandc++ graphic.h

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 2
Reputation: ahmed_hossni is an unknown quantity at this point 
Solved Threads: 0
ahmed_hossni ahmed_hossni is offline Offline
Newbie Poster

plz help i have prblm in Borlandc++ graphic.h

 
0
  #1
Dec 12th, 2007
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>>librariers>>graphic librariers.
(
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();
}
Last edited by ahmed_hossni; Dec 12th, 2007 at 3:20 pm. Reason: forget something
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,603
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: plz help i have prblm in Borlandc++ graphic.h

 
0
  #2
Dec 12th, 2007
>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.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 50
Reputation: guy40az is an unknown quantity at this point 
Solved Threads: 2
guy40az guy40az is offline Offline
Junior Poster in Training

Re: plz help i have prblm in Borlandc++ graphic.h

 
0
  #3
Dec 12th, 2007
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 .
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 2
Reputation: ahmed_hossni is an unknown quantity at this point 
Solved Threads: 0
ahmed_hossni ahmed_hossni is offline Offline
Newbie Poster

Re: plz help i have prblm in Borlandc++ graphic.h

 
0
  #4
Dec 12th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC