| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1134 人关注过本帖
标题:Xcode 引用函数,找不到头文件怎么办。
只看楼主 加入收藏
wanyuyu
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2021-10-29
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
Xcode 引用函数,找不到头文件怎么办。
#include<cstdio>          'cstdio' file not found
#include<algorithm>
using namespace std;
int main(){
    const int n=6;
    int a[6]={5,12,7,2,9,3};
    sort(a,a+n);//对数组a进行排序
    for(int i=0;i<n;i++){
        printf("%d ",a[i]);
    }
    return 0;}



搜索更多相关主题的帖子: 引用 函数 头文件 int 找不到 
2021-10-29 22:52
自由而无用
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:14
帖 子:61
专家分:1456
注 册:2021-8-9
收藏
得分:0 
Good morning angel, sorry for replying your question so late
firstly, your code is good while I test it by using bccn->online parser: https://www.bccn.net/run/(choose c++)
-----------------------------------------------------------
and your problem maybe like this:
https://blog.your code looks like c++ project not c project
https://blog.
https://blog.
https://blog.
-----------------------------------------------------------
or you could also search it from the apple site:
https://developer.

//online parser: https://www.bccn.net/run/(choose c++)
程序代码:
#include <iostream>
#include <algorithm>

using namespace std;

int main(int argc, char *argv[])
{
    const int n = 6;
    int a[6] = {5, 12, 7, 2, 9, 3};
    //sort
    sort(a, a + n);
    //print
    for(int i = 0; i < n; i++)
        std::cout << a[i] << " ";

    return 0;
}


output sample:

2 3 5 7 9 12

[此贴子已经被作者于2021-10-30 07:47编辑过]

2021-10-30 07:44
wanyuyu
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2021-10-29
收藏
得分:0 
回复 2楼 自由而无用
Thanks.
2021-10-30 10:10
自由而无用
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:14
帖 子:61
专家分:1456
注 册:2021-8-9
收藏
得分:0 
回复 3楼 wanyuyu
my pleasure honey~~ nice weekend
2021-10-30 10:18
快速回复:Xcode 引用函数,找不到头文件怎么办。
数据加载中...
 
   



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

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