| | |
plz help i have prblm in Borlandc++ graphic.h
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
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();
}
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
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
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
i hope anyone help me ,, and find answer to my problem & also tell me about a good compiler to use it .. thank uzzzzzzzzzzzzzzzzzzzz
![]() |
Other Threads in the C++ Forum
- Previous Thread: please help me!
- Next Thread: Is there a way to prevent creating objects on heap?
| Thread Tools | Search this Thread |
api array based binary bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez graph guess gui homeworkhelp homeworkhelper iamthwee ifpug ifstream incrementoperators infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






