Borland C++ 5.02

This is a discussion on Borland C++ 5.02 within the C++ Programming forums, part of the General Programming Boards category; I am in deep doo doo with this compiler... 1) Does ANYONE know how to use graphics.h 2) Why doesnt ...

  1. #1
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200

    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????
    What is C++?

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    >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.
    My Website

    "Circular logic is good because it is."

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    241
    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.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    241
    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;
    }

  5. #5
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200

    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'

    What is C++?

  6. #6
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    >> Try MSVC++

    I WISH i could get that...

    im not rich and i cant find it in stores..

    Ive seen MSVC++ .NET for 100$
    What is C++?

  7. #7
    Registered User
    Join Date
    Nov 2001
    Posts
    241
    It should work cause it did before, but I'll try it sometime on my computer

  8. #8
    Registered User
    Join Date
    Nov 2001
    Posts
    241
    I got that same error, but I know that program did work fine before

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. play flash file using borland 5.02 no MFC
    By gaurav07 in forum Windows Programming
    Replies: 0
    Last Post: 05-30-2005, 02:40 AM
  2. how to display jpeg image using borland C++ 5.02
    By gaurav07 in forum Windows Programming
    Replies: 2
    Last Post: 05-26-2005, 02:42 AM
  3. borland 5.02 - api/gui
    By Noobie in forum C++ Programming
    Replies: 5
    Last Post: 02-10-2003, 09:28 PM
  4. Borland C++ 5.02 with Windows Millenium Edition
    By NCCMelissa in forum C Programming
    Replies: 8
    Last Post: 04-12-2002, 09:15 PM
  5. STEP turbo C 3.0 >< Borland 5.02
    By Huh..... in forum C Programming
    Replies: 0
    Last Post: 03-12-2002, 06:54 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21