正在加载图片...
3 Function's type Getting parameters and returning value.For example: int bigger(int a,int b) { return(a>b)?a:b; Getting parameters but not return value.For example: void delay(long a) for(int i=1;i<=a;i++); C++要求在定义函数时必须指定函数的类型。 017年4月26日12时17分 HOME 第4章函数与预处理 8 BACK NEXTHOME2017年4月26日12时17分 第4章 函数与预处理 8 • Getting parameters and returning value. For example: int bigger(int a, int b) { return(a>b)?a:b; } • Getting parameters but not return value. For example: void delay(long a) { for(int i=1;i<=a;i++); } • C++要求在定义函数时必须指定函数的类型
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有