C语言如何调用外部函数及方法
#include "stdio.h"//#include "b.h" //invoking the same director function 调用在同一目录下的函数//#include "../b.h" //invoking the page upper director function 调用在同盘符下上级目录下的函数,调用子目录用/../即可
//#include "d:/b.h" //invoking the other director function 调用在不同盘符下的函数
/*void move(char x,char y)
{
printf("%c-->%c\n",x,y);
}
void hanoi(int n ,char one,char two ,char three)
{
if(n==1)
move(one,three);
else {
hanoi(n-1,one,three,two);
move(one,three);
hanoi(n-1,two,one,three);
}
}
//invoking the function inner class ,must write at the top,otherwhile cannot be invoking.调用在同一个文件里的函数,注意函数要写在主函数main之前*/
main()
{
int m;
printf("input the number of diskes:");
scanf("%d",&m);
printf("The step to moving %3d diskes:\n",m);
hanoi(m,'A','B','C'); system("pause");
}