Problem with Turbo C

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..
๐Ÿ˜”???

Replies

  • komputergeek
    komputergeek
    Check this:
    #-Link-Snipped-#
  • Ashutosh_shukla
    Ashutosh_shukla
    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.
  • rajanmr
    rajanmr
    Check libraries in turboc options. Generally graphics library will be not checked. We have manually enable it by clicking on the option button.
  • Ankp
    Ankp
    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 ???
  • Ashutosh_shukla
    Ashutosh_shukla
    I told you post your code Please if you do that may be we can help you properly.
  • Ankp
    Ankp
    #include
    #include
    #include
    #include

    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....
  • sumitjami
    sumitjami
    ---->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.........๐Ÿ˜
  • Ankp
    Ankp
    ya bro.... i know that...just forgot to write .....but when i am writing it then also its not working...




    #include
    #include
    #include
    #include

    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...๐Ÿ˜•
  • Ashutosh_shukla
    Ashutosh_shukla
    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
  • sumitjami
    sumitjami
    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........

You are reading an archived discussion.

Related Posts

CEans, When engineering goes beyond the obvious and breaks the boundaries, we call it Crazy Engineering - the engineering that changes the world. Turns dreams into realities. Makes the impossible,...
Right, this is my first post.. ๐Ÿ˜’ I want to make a flashing LED for my car. At the moment i have a flashing LED wired to my central locking...
Hello, I m computer science's student.I want some project topics based on core java.Pleaze reply
How does gmail, yahoo work like what are technologies it uses, how it process, how it has been built,
๐Ÿ˜• HI EVERYBODY, I AM NEW MEMEBER OF THIS FORUM, I AM STUDYING BCA FINAL YEAR, I WANT TO MAKE A MINI PROJECT, SO PLEASE ANY ONE CAN SUGGESTS ME...