CrazyEngineers
  • Problem with Turbo C

    Ankp

    Member

    Updated: Oct 24, 2024
    Views: 1.1K
    guys i have a problem..i cannot use turboc compiler to compile a computer graphics program in my PC.Other C,C++ programs are run in C.But C Graphics programs are not running..i am using AMD 3600+ processor and nvidia motherboard (M2n-MX)..do any one help me with this..
    😔???
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • komputergeek

    MemberDec 1, 2008

    Check this:
    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • Ashutosh_shukla

    MemberDec 2, 2008

    You may have an error of runtime in windows if you do not specify correct path for initgraph(). Try getting correct path Remember that to specify \ you need to give \\ instead of \ . See if this works or post a small program that you cannot compile.
    Are you sure? This action cannot be undone.
    Cancel
  • rajanmr

    MemberDec 2, 2008

    Check libraries in turboc options. Generally graphics library will be not checked. We have manually enable it by clicking on the option button.
    Are you sure? This action cannot be undone.
    Cancel
  • Ankp

    MemberDec 5, 2008

    i have give all correct paths and i have included all graphics library...
    but then also it not working...i am doing line drawing algorithms in C graphics.program is compiling but when i am trying to run it. turbo C is going to be closed..
    so please help me wht to do ???
    Are you sure? This action cannot be undone.
    Cancel
  • Ashutosh_shukla

    MemberDec 6, 2008

    I told you post your code Please if you do that may be we can help you properly.
    Are you sure? This action cannot be undone.
    Cancel
  • Ankp

    MemberDec 7, 2008

    #include<stdio.h>
    #include<conio.h>
    #include<dos.h>
    #include<graphics.h>

    void main()
    {
    int i,x=0;
    int gd=DETECT,gm;
    float r,y,xinc=1,yinc=0.75;
    initgraph(&gd,&gm,"");
    setfillstyle(1,4);
    setcolor(4);
    y=getmaxy()/2;
    printf("\nEnter the radious=>");
    scanf("%f",&r);

    while(!kbhit())
    {
    setcolor(4);
    circle(x,y,r);
    floodfill(x,y,4);
    if(x+r>=getmaxx())
    xinc=-1.0;
    if(x-r<=0)
    xinc=1.0;
    x=x+xinc;
    if(y+r>=getmaxy())
    yinc=-0.75;
    if(y-r<=0)
    yinc=0.75;
    y=y+yinc;
    delay(10);
    cleardevice();
    }
    getch();
    }


    this is my program....i can compile it. but when i am going to run it, turbo c is going to close....
    Are you sure? This action cannot be undone.
    Cancel
  • sumitjami

    MemberDec 7, 2008

    ---->initgraph(&gd,&gm,"");
    just replace this line by
    ---->initgraph(&gd,&gm,"c:\\tc\\bgi\\*.*");
    make sure that all directories are properly addressed and you have and the path "c:\tc\bgi\" exists if such path does not exist then try to find some other compilor there there is no problem with your motherboard or processor.........😁
    Are you sure? This action cannot be undone.
    Cancel
  • Ankp

    MemberDec 9, 2008

    ya bro.... i know that...just forgot to write .....but when i am writing it then also its not working...




    #include<stdio.h>
    #include<conio.h>
    #include<dos.h>
    #include<graphics.h>

    void main()
    {
    int i,x=0;
    int gd=DETECT,gm;
    float r,y,xinc=1,yinc=0.75;
    initgraph(&gd,&gm,"C:\\TC\\bgi");
    setfillstyle(1,4);
    setcolor(4);
    y=getmaxy()/2;
    printf("\nEnter the radious=>");
    scanf("%f",&r);

    while(!kbhit())
    {
    setcolor(4);
    circle(x,y,r);
    floodfill(x,y,4);
    if(x+r>=getmaxx())
    xinc=-1.0;
    if(x-r<=0)
    xinc=1.0;
    x=x+xinc;
    if(y+r>=getmaxy())
    yinc=-0.75;
    if(y-r<=0)
    yinc=0.75;
    y=y+yinc;
    delay(10);
    cleardevice();
    }
    getch();
    }



    this is also not working...😕
    Are you sure? This action cannot be undone.
    Cancel
  • Ashutosh_shukla

    MemberDec 9, 2008

    i ran your code and it works just make sure that your bgi files are in correct place i dont see any reason for code not to run
    Are you sure? This action cannot be undone.
    Cancel
  • sumitjami

    MemberDec 9, 2008

    try this.........copy all the files in the "bgi" folder in the "tc" directry and paste it in the bin folder
    .......also check for the directories i.e.they should be properly addressed........if still it does not work try different compiler........
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register