| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 636 人关注过本帖
标题:C语言如何调用外部函数及方法
只看楼主 加入收藏
angelMo
Rank: 1
等 级:新手上路
帖 子:3
专家分:7
注 册:2014-10-31
收藏
 问题点数:0 回复次数:0 
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");
}
搜索更多相关主题的帖子: 如何 C语言 include director function 
2014-10-31 16:38
快速回复:C语言如何调用外部函数及方法
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014021 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved