##include "stdio.h"
//在全局范围内定义两个ShowMessage重载函数
void ShowMessage(const char* Text ,const char* Caption)
{
printf("Message: Text=%s,Caption=%s\n",Text,Caption);
}void ShowMessage(const char* Text ,unsigned int Type)
{
printf("Message: Text=%s,Type=%d\n",Text,Type);}int main()
{
//依次调用两个重载函数
ShowMessage("ok","welcom");
ShowMessage("ok",1);return 0;
}
红色的部分表示什么意思?那个Text=%s,Type=%d怎么理解