标题:在c++中,内置函数声明必须在main函数外面吗?
取消只看楼主
meidireshuiq
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2011-9-9
结帖率:85.71%
已结贴  问题点数:5 回复次数:1 
在c++中,内置函数声明必须在main函数外面吗?
c++中,内置函数声明必须在main函数外面吗?#include <iostream>
using namespace std;
int main()
{
    inline int max(int a,int b);
    int a,b,c;
    cin>>a>>b;
    c=max(a,b);
    cout<<"max(a,b)="<<c;
    return 0;
}
inline int max(int a,int b)
{
    if(b>a)a=b;
    return a;
}
不对吗?
搜索更多相关主题的帖子: 声明 include using 
2011-09-22 16:55
meidireshuiq
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2011-9-9
得分:0 
怎么没人回答啊
2011-09-22 20:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-350604-1-1.html




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

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