Hi, I seem to be having !ymany many many errors with Turbo C++. I
entered a program out of a book, checked it over many times, had other
people check it over, and compiled it. I always get 1 warning and 5
errors. The errors always have to do with stuff like initgraph,
setcolor, lineto, moveto, etc. I also try running other programs
included with Turbo C++ and they always conclude with the same errors I
get! Here's an example of the program TENDRILS.CPP:
// tendrils.cpp
// draws "biological" forms
#include
#include
#include
#include
#include
const int XO=320;
const int YO=240;
const float PI=3.14159;
const int NUME=30;
const int DENOM=100;
const int NUMBER = 7;
const float RAD = 3.0;
const float DELTHETA = 0.1;
const int SEGS = 60;
const int REDUX = 3;
const int MIN = 1;
class cluster
{
public:
void display(int size, int x, int y);
};
class tendril
{
public:
void display(int size, float theta, int x, int y);
};
void cluster::display(int size, int x0, int y0)
{
if( kbhit() )
exit(0);
for(int i=0; i MIN )
{
cluster c;
int newsize = size / REDUX;
c.display(newsize, x, y);
}
}
void main()
{
int driver, mode;
driver = VGA;
mode = VGAHI;
initgraph(&driver, &mode, "\\tc\\bgi");
randomize();
int x=XO, y=YO;
int size = SEGS;
cluster c;
c.display(size, x, y);
getch();
closegraph();
}
There it is. There's not a problem with any of the examples included
with Turbo C++ or anything wrong with the program above. It all has
something to do with initgraph. Any suggestions? Write me here or
e-mail be at Toe.Nail@juno.com.
@09@
@09@ @0C@Toe.Nail@juno.com @09@
@09@---@0B@Matthew@09@@0A@DuHart@09@--@07@
--- GOMail v2.0 [94-0605]
---------------
* Origin: The Buzzard's Roost, Pueblo, CO (719) 564-8235 (1:307/8)
|