今天来讲一讲,函数的引用;
#include<stdio.h>
void Move;
void Build;
void Paint;
int main()
{
Move();
Build();
Paint();
return 0;
}
void Move()
{
printf("the function is move material");
}
void Build()
{
printf("the function is building a build");
}
void Paint()
{
printf("the function is Paint cloth“);
}
在此应注意void是老版本的形式;
#include<stdio.h>
void ShowNumber(int iNumber);//函数声明
int main()
{
int iShowNumber;
printf("What Number do you want show\\n");
scanf("%d",&iShowNumber);
ShowNumber(iShowNumber);
return 0;
}
void ShowNumber(int iNumber)//函数定义
{
printf("you want to show the Number is :%d\\n",iNumber):
}
函数定义在函数体的底部;
当将函数定义放在首部,就可以省略函数声明;