Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@komputergeek-Yf5hJ4 • Dec 1, 2008
Check this:
#-Link-Snipped-# -
@ashutosh-shukla-ed4Ei4 • Dec 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.
-
@rajanmr-e8BG3z • Dec 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. -
@ankp-F4CEZq • Dec 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 ??? -
@ashutosh-shukla-ed4Ei4 • Dec 6, 2008
I told you post your code Please if you do that may be we can help you properly. -
@ankp-F4CEZq • Dec 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.... -
@sumitjami-UHV2GH • Dec 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.........😁 -
@ankp-F4CEZq • Dec 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...😕 -
@ashutosh-shukla-ed4Ei4 • Dec 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 -
@sumitjami-UHV2GH • Dec 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........