LQ Newbie
Registered: Jun 2008
Posts: 1
Rep:
|
header file for using getch and also for graphic programming in linux
my windows program-
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<math.h>
#include<other.h>
void main()
{
int gd=DETECT,gm,p[100],k,l,n;
float x,y,x2,y2,x3,y3,i;
initgraph(&gd,&gm,"c:\\tc\\bgi");
printf("codes for different motions:\n----------------------------\n");
printf("shm=10,11\tdewll=20,21\ncv=30,31\tcyc=40,41");
printf("\n----------------------------\nEnter the no of paths=");
scanf("%d",&n);
printf("Enter the sequance:\t\t\t\tDisplacment diagram\n");
for(l=0;l<=2*n;l++)
scanf("%d",&p[l]);
printf("----------------------------\nscale:\n x-aixs 1block=10deg");
setcolor(BLUE);
circle(420,200,30);
graph();
for(k=0;k<n;k++)
{
setcolor(WHITE);
line(20,400+2*k,50,400+2*k);
if(p[k]==10||p[k]==11)
shm(p[k],p[k+n],p[k+n+1],x,y,x2,y2,x3,y3,i);
if((p[k]==20||p[k]==21)&&(p[k]!=10||p[k]!=11))
dewl(p[k],p[k+n],p[k+n+1]);
if((p[k]==30||p[k]==31)&&(p[k]!=20||p[k]!=21))
uv(p[k],p[k+n],p[k+n+1],x,y,x2,y2,x3,y3);
if((p[k]==40||p[k]==41)&&(p[k]!=30||p[k]!=31))
cyc(p[k],p[k+n],p[k+n+1],x,y,x2,y2,x3,y3,i);
}
getch();
}
i want to run this program in linux. but main problem is that i work on cluster computer in my college, and can't access /include folder to put my header file 'other.h' as used above in it so what to do to include this file. one more thing, what header file is for getch() and also for in place of 'graphics.h' beside this tell me what correction i should make in my program to run it efficiently...
|