-
Borland C++ 5.02
I am in deep doo doo with this compiler...
1) Does ANYONE know how to use graphics.h
2) Why doesnt exit(0) work?
3) If graphics.h will not work with borland..... Is there something else that will make graphics in a console....
Many people have told me you cant do graphics in a console..
Then what is Vasanth's Snake game????
-
>Does ANYONE know how to use graphics.h
I do.
>Why doesnt exit(0) work?
It does...ur probably not closing something down right...
>If graphics.h will not work with borland..... Is there something else that will make graphics in a console....
graphics.h is a DOS graphics library, not console, they are two different things. Graphics cannot be done with console. If you need proof, try doing them in MSVC++.
email me if you need specific help trying to do something with it...I can help you with graphics.h.
-
Graphics CAN be done in a console application, but there are certain screen commands that need to be done with borland 5.02. I did this in a class about 3 years ago, and it is possible.
-
This is hat one of our programs was, and it should work, although I may have misspelled something when I was coping what my paper had on it.
Code:
#include <graphics.h>
#include <iostream.h>
#include <math.h>
#include <conio.h>
main()
{
int c=0, graphdriver, graphmode, r;
clrscr();
cout << "\n\n\n\n\nPress <Enter> to go to Graphics Mode";
graphdriver=DETECT;
initgraph (&graphdriver, &graphmode, "c:\\bc5\\bgi\\");
outtext ("Here is a rectangle");
rectangle (50,50,200,100);
getch();
outtextxy(10,150,"Here is a line");
line(20,170,300,300);
getch();
outtextxy(400,70,"And here are some circles");
for (r=30;r<=110;r=r+20)
{
c++;
setcolor(c);
circle(500,300,r);
getch();
}
settextstyle(DETECT_FONT, VERT_DIR, 3);
outtextxy(90, 250, "All Done!");
getch();
closegraph;
return 0;
}
-
Hmm...
It will not run in a console...
I get the error "BGI Graphics not suppored under windows"
And I tries Dos(overlay) and Standard and I got this
Undefined symbol 'DETECT_FONT'
:confused:
-
>> Try MSVC++
I WISH i could get that...
im not rich and i cant find it in stores..
Ive seen MSVC++ .NET for 100$
-
It should work cause it did before, but I'll try it sometime on my computer
-
I got that same error, but I know that program did work fine before