设为首页 加入收藏

TOP

C++函数重载
2014-11-13 09:15:05 】 浏览:7765
Tags:函数 重载

  //函数重载的使用


  #include


  using namespace std;


  int max(int,int);


  int max(int,int,int);// 函数如果定义在后应该先声明在调用


  void main()


  {


  cout<<<","<<


  }


  int max(int m1,int m2)


  { return(m1>m2) m1:m2;}//三目运算


  int max(int m1,int m2,int m3)


  {


  int t=max(m1,m2);


  return max(t,m3);


  }


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇组合数快速算法 下一篇CString转换为string的做法

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目