sample program how to create a circle in TURBO C++ - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

sample program how to create a circle in TURBO C++

eikcajeikcaj Posts: 10Member
sample program how to create a circle in TURBO C++.. can u help me.. thanks..

«1

Comments

  • MT2002MT2002 Posts: 1,444Member
    : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    :
    :
    [blue]
    This should help...

    http://www.onecore.net/turbo-c-graphics-programming.htm

    Please note this uses Borlands [b]nonstandard[/b] graphics library.
    Hence, it is not portable, and may not work with other compilers
    (ie, wont work with MSVC++, DevC++, et al)

    ~mt2002
    [/blue]
  • eikcajeikcaj Posts: 10Member
    : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : :
    : :
    : [blue]
    : This should help...
    :
    : http://www.onecore.net/turbo-c-graphics-programming.htm
    :
    : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : Hence, it is not portable, and may not work with other compilers
    : (ie, wont work with MSVC++, DevC++, et al)
    :
    : ~mt2002
    : [/blue]

    Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..

    BGI Error: Graphics not intialized (use initgraph)
    can you help me again


  • MT2002MT2002 Posts: 1,444Member
    : : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : : :
    : : :
    : : [blue]
    : : This should help...
    : :
    : : http://www.onecore.net/turbo-c-graphics-programming.htm
    : :
    : : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : : Hence, it is not portable, and may not work with other compilers
    : : (ie, wont work with MSVC++, DevC++, et al)
    : :
    : : ~mt2002
    : : [/blue]
    :
    : Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..
    :
    : BGI Error: Graphics not intialized (use initgraph)
    : can you help me again
    :
    :
    :
    [blue]
    initgraph() is returning an error code. Use graphresult() to get
    the error code..
    [/blue][code]
    int gerr = 0;
    initgraph(&gd, &gm, c:/tc/bgi );

    // Insure this test is [b]right after[/b] initgraph()
    if ((gerr = graphresult()) != grOk) {

    // error
    }
    [/code][blue]
    This site has a list of the possible error codes...

    http://www.cs.colorado.edu/~main/cs1300/doc/bgi/graphresult.html

    Please let us know what error you are having.
    [/blue]

  • LundinLundin Posts: 3,711Member
    : : : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : : : :
    : : : :
    : : : [blue]
    : : : This should help...
    : : :
    : : : http://www.onecore.net/turbo-c-graphics-programming.htm
    : : :
    : : : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : : : Hence, it is not portable, and may not work with other compilers
    : : : (ie, wont work with MSVC++, DevC++, et al)
    : : :
    : : : ~mt2002
    : : : [/blue]
    : :
    : : Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..
    : :
    : : BGI Error: Graphics not intialized (use initgraph)
    : : can you help me again
    : :
    : :
    : :
    : [blue]
    : initgraph() is returning an error code. Use graphresult() to get
    : the error code..
    : [/blue][code]
    : int gerr = 0;
    : initgraph(&gd, &gm, “c:/tc/bgi “);
    :
    : // Insure this test is [b]right after[/b] initgraph()
    : if ((gerr = graphresult()) != grOk) {
    :
    : // error
    : }
    : [/code][blue]
    : This site has a list of the possible error codes...
    :
    : http://www.cs.colorado.edu/~main/cs1300/doc/bgi/graphresult.html
    :
    : Please let us know what error you are having.
    : [/blue]
    :
    :


    Probably missing the path to that pesky egavga.bgi. As a comment, BGI graphics won't work with Borland compilers either. They abandoned DOS 12 years ago like everyone else except some hobby-people.
  • eikcajeikcaj Posts: 10Member
    : : : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : : : :
    : : : :
    : : : [blue]
    : : : This should help...
    : : :
    : : : http://www.onecore.net/turbo-c-graphics-programming.htm
    : : :
    : : : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : : : Hence, it is not portable, and may not work with other compilers
    : : : (ie, wont work with MSVC++, DevC++, et al)
    : : :
    : : : ~mt2002
    : : : [/blue]
    : :
    : : Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..
    : :
    : : BGI Error: Graphics not intialized (use initgraph)
    : : can you help me again
    : :
    : :
    : :
    : [blue]
    : initgraph() is returning an error code. Use graphresult() to get
    : the error code..
    : [/blue][code]
    : int gerr = 0;
    : initgraph(&gd, &gm, c:/tc/bgi );
    :
    : // Insure this test is [b]right after[/b] initgraph()
    : if ((gerr = graphresult()) != grOk) {
    :
    : // error
    : }
    : [/code][blue]
    : This site has a list of the possible error codes...
    :
    : http://www.cs.colorado.edu/~main/cs1300/doc/bgi/graphresult.html
    :
    : Please let us know what error you are having.
    : [/blue]
    :
    : thank.. i try again..


  • eikcajeikcaj Posts: 10Member
    : : : : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : : : : :
    : : : : :
    : : : : [blue]
    : : : : This should help...
    : : : :
    : : : : http://www.onecore.net/turbo-c-graphics-programming.htm
    : : : :
    : : : : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : : : : Hence, it is not portable, and may not work with other compilers
    : : : : (ie, wont work with MSVC++, DevC++, et al)
    : : : :
    : : : : ~mt2002
    : : : : [/blue]


    : : :
    : : : Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..
    : : :
    : : : BGI Error: Graphics not intialized (use initgraph)
    : : : can you help me again
    : : :
    : : :
    : : :
    : : [blue]
    : : initgraph() is returning an error code. Use graphresult() to get
    : : the error code..
    : : [/blue][code]
    : : int gerr = 0;
    : : initgraph(&gd, &gm, c:/tc/bgi );
    : :
    : : // Insure this test is [b]right after[/b] initgraph()
    : : if ((gerr = graphresult()) != grOk) {
    : :
    : : // error
    : : }
    : : [/code][blue]
    : : This site has a list of the possible error codes...
    : :
    : : http://www.cs.colorado.edu/~main/cs1300/doc/bgi/graphresult.html
    : :
    : : Please let us know what error you are having.
    : : [/blue]
    : :
    : : thank.. i try again..
    : hey... thank you very much.. its working.. i hope u still help me.. im going home now.. ... but still .. i have more problem.. can you give sample program in drawing a line, a curve and free shapes.. if you dont mind it.. plz help me again..

    :
    :

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [blue]Put a cursor on "graphics.h" in your code and press CTRL+F1 - this should give you a Help Screen with all functions available in that .H file. You should find there how to do line(), arc() and other shapes.
    [/blue]
  • MT2002MT2002 Posts: 1,444Member
    [b][red]This message was edited by MT2002 at 2007-1-11 12:42:33[/red][/b][hr]
    : : : : : : sample program how to create a circle in TURBO C++.. can u help me.. thanks..
    : : : : : :
    : : : : : :
    : : : : : [blue]
    : : : : : This should help...
    : : : : :
    : : : : : http://www.onecore.net/turbo-c-graphics-programming.htm
    : : : : :
    : : : : : Please note this uses Borlands [b]nonstandard[/b] graphics library.
    : : : : : Hence, it is not portable, and may not work with other compilers
    : : : : : (ie, wont work with MSVC++, DevC++, et al)
    : : : : :
    : : : : : ~mt2002
    : : : : : [/blue]
    :
    :
    : : : :
    : : : : Thanks..i type the sample program.. and i wrote the directory of my bgi files.. then when i run it.. the screen says..
    : : : :
    : : : : BGI Error: Graphics not intialized (use initgraph)
    : : : : can you help me again
    : : : :
    : : : :
    : : : :
    : : : [blue]
    : : : initgraph() is returning an error code. Use graphresult() to get
    : : : the error code..
    : : : [/blue][code]
    : : : int gerr = 0;
    : : : initgraph(&gd, &gm, c:/tc/bgi );
    : : :
    : : : // Insure this test is [b]right after[/b] initgraph()
    : : : if ((gerr = graphresult()) != grOk) {
    : : :
    : : : // error
    : : : }
    : : : [/code][blue]
    : : : This site has a list of the possible error codes...
    : : :
    : : : http://www.cs.colorado.edu/~main/cs1300/doc/bgi/graphresult.html
    : : :
    : : : Please let us know what error you are having.
    : : : [/blue]
    : : :
    : : : thank.. i try again..
    : : hey... thank you very much.. its working.. i hope u still help me.. im going home now.. ... but still .. i have more problem.. can you give sample program in drawing a line, a curve and free shapes.. if you dont mind it.. plz help me again..
    :
    : :
    : :
    :
    :
    [blue]
    Follow AsmGuru62's advice, and take a look at the avilable routines in
    the BGI graphics library.

    On a side question -- Why are you using a (Very) old compiler? Some systems might not even support BGI because it has been deprecated.
    ...Just curious. (Not sure, but I think mode 13h (or mode X) are more
    standard then BGI, nontheless even those are deprecated.)
    [/blue]


  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : [blue]
    : Follow AsmGuru62's advice, and take a look at the avilable routines in
    : the BGI graphics library.
    :
    : On a side question -- Why are you using a (Very) old compiler? Some systems might not even support BGI because it has been deprecated.
    : ...Just curious. (Not sure, but I think mode 13h (or mode X) are more
    : standard then BGI, nontheless even those are deprecated.)
    : [/blue]

    [green]Actually BGI will work almost everywhere.
    Why do you think it will not work. If it is compiled - it should work fine. Slower than others, but should be still working.[/green]
  • MT2002MT2002 Posts: 1,444Member
    : : [blue]
    : : Follow AsmGuru62's advice, and take a look at the avilable routines in
    : : the BGI graphics library.
    : :
    : : On a side question -- Why are you using a (Very) old compiler? Some systems might not even support BGI because it has been deprecated.
    : : ...Just curious. (Not sure, but I think mode 13h (or mode X) are more
    : : standard then BGI, nontheless even those are deprecated.)
    : : [/blue]
    :
    : [green]Actually BGI will work almost everywhere.
    : Why do you think it will not work. If it is compiled - it should work fine. Slower than others, but should be still working.[/green]
    :
    [blue]
    I didnt know it required externel libraries (ie, the BGI driver).
    I never used BGI, which is why I asked.[/blue]
«1
Sign In or Register to comment.