Hello!
I write this program form "Robert w.Lafore" 's book(Object Oriented Programming in C++/"functions" chapter/(about "struct circle"))but the "c++builder5" 's compiler message that "UNABLE TO OPEN INCLUDE FILE "BORLACON.H"!!!!!
my question is the "borlacon.h" dosen't exists??!!! ;)
1->How I can fix this program?

#include"borlacon.h"
#include<conio.h>
struct circle
{
 int xCo,yCo;
 int radius;
 color fillcolor;
 fstyle fillstyle;
};
//------------------------------------------------------------------------------
void circle_draw(circle c)
{
 set_color(c.fillcolor);
 set_fill_style(c.fillstyle);
 draw_circle(c.xCo,c.yCo,c.radius);
}
//******************************************************************************
int main(){
init_graphics();

circle c1={15,7,5,cBLUE,X_FILL};
circle c2={41,12,7,cRED,O_FILL};
circle c1={65,18,4,cGREEN,MEDIUM_FILL};

circ_draw(c1);
circ_draw(c2);
circ_draw(c3);
set_cursor_pos(1,25);
return 0;
}
//------------------------------------------------------------------------------

you have to research the header file and type it yourself. place in your "include" directory.
Borlacon.h

//borlacon.h
//declarations for Console Graphics Lite functions
//uses Borland's console functions
#ifndef _INC_WCONSOLE  //don't let this file be included
#define _INC_WCONSOLE  //twice in the same source file

#include <windows.h>   //for Sleep()
#include <conio.h>     //for kbhit(), getche()
#include <math.h>      //for sin, cos

enum fstyle { SOLID_FILL, X_FILL, O_FILL,
              LIGHT_FILL, MEDIUM_FILL, DARK_FILL };

enum color {
   cBLACK=0,     cDARK_BLUE=1,    cDARK_GREEN=2, cDARK_CYAN=3,
   cDARK_RED=4,  cDARK_MAGENTA=5, cBROWN=6,      cLIGHT_GRAY=7,
   cDARK_GRAY=8, cBLUE=9,         cGREEN=10,     cCYAN=11,
   cRED=12,      cMAGENTA=13,     cYELLOW=14,    cWHITE=15 };
//--------------------------------------------------------------
void init_graphics();
void set_color(color fg, color bg = cBLACK);
void set_cursor_pos(int x, int y);
void clear_screen();
void wait(int milliseconds);
void clear_line();
void draw_rectangle(int left, int top, int right, int bottom);                    
void draw_circle(int x, int y, int rad);
void draw_line(int x1, int y1, int x2, int y2);
void draw_pyramid(int x1, int y1, int height);
void set_fill_style(fstyle);
#endif // _INC_WCONSOLE

that's the header file.

> Aug 9th 2004, 12:27 PM
You should have waited the full two YEARS before bumping this thread :rolleyes:

> Aug 9th 2004, 12:27 PM
You should have waited the full two YEARS before bumping this thread :rolleyes:

didn't look at the date. just saw the subject.

>You should have waited the full two YEARS before bumping this thread
Didn't even notice that.:o

How about we close this.

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.