Is there a function that draw 2d objects like boxes and circles .
I remember that in qbasic there was a few 2dobjects functions so i thought that there is a chance c will have some too.
I recently wrote a program and provided the code under the cpluplus code snippet section. It doesn't write circles but I does illustrate how to make an inverted box.. I'll post that program later but take a look at this one, it might give you some ideas. Here is the link http://www.daniweb.com/code/snippet650.html
Ok I've modified that program so that you can choose whether you want an inverted disply or regular.
A graphics library borland BGI is included with your Turbo C. The declaration are present in graphic.h file. To view all its members and know how to use it, right click the blue screen i.e. editor, you will find index, find graphics.h.
To make a line there are several functions such as line, linto. This is lineto example:
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
/* initialize graphics and local variables */
[B] initgraph(&gdriver, &gmode, "\\bc\\bgi");
[/B]/*the third argument must be the path to bgi folder in your tc directly.
I am using borland c and it is in "bc" folder is in root drive, so its \\bc\\bgi.
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
xmax = getmaxx();
ymax = getmaxy();
/* draw a diagonal line */
line(0, 0, xmax, ymax);
/* clean up */
>Anyone know if the 2006 version of Turbo
>C++ comes with that graphics library?
No, Turbo C++ 2006 is a modern development tool. graphics.h is an ancient library that only works on ancient systems. If you want to do graphics, stick to Win32 or .NET. IF you don't like the "evil empire", use Allegro or SDL, or any of the other freely available libraries that actually work on current systems.