| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 447 人关注过本帖
标题:为什么只能到4991
取消只看楼主 加入收藏
dtxwz
Rank: 2
等 级:论坛游民
帖 子:79
专家分:45
注 册:2011-9-18
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:4 
为什么只能到4991
#include<stdio.h>
int main()
{
    int a[10000],i,j,k,t;

    for(i = 0;i < 10000;i++)
        a[i] = i;

    for(i = 0;i < 10000-1;i++)
    {
        k = i;
        for(j = i+1;j < 10000;j++)
        {
            if(a[j] > a[i])
                k = j;
        }
        if(k!=i)
        {
            t = a[i];
            a[i] = a[k];
            a[k] = t;
        }
    }

    for(i = 0;i < 10000;i++)
        printf("%d ",a[i]);
    return 0;
}
搜索更多相关主题的帖子: return 
2013-11-08 18:44
dtxwz
Rank: 2
等 级:论坛游民
帖 子:79
专家分:45
注 册:2011-9-18
收藏
得分:0 
illegal use of this type as an expression
  see declaration of 'COORD'
error C2146: syntax error : missing ';' before identifier 'size'
error C2065: 'size' : undeclared identifier
 error C2059: syntax error : '{'
error C2115: 'function' : incompatible types
warning C4024: 'SetConsoleScreenBufferSize' : different types for formal and actual parameter 2
 error C2143: syntax error : missing ';' before 'type'
error C2065: 'i' : undeclared identifier
error C2065: 'a' : undeclared identifier
 error C2109: subscript requires array or pointer type
 error C2106: '=' : left operand must be l-value
error C2109: subscript requires array or pointer type
 error C2065: 'k' : undeclared identifier
 error C2065: 'j' : undeclared identifier
error C2109: subscript requires array or pointer type
error C2109: subscript requires array or pointer type
error C2065: 't' : undeclared identifier
 error C2109: subscript requires array or pointer type
 error C2109: subscript requires array or pointer type
 error C2109: subscript requires array or pointer type
error C2106: '=' : left operand must be l-value
error C2109: subscript requires array or pointer type
 error C2106: '=' : left operand must be l-value
error C2109: subscript requires array or pointer type
我的为啥编译错误啊 是环境的问题么?
2013-11-08 19:21
dtxwz
Rank: 2
等 级:论坛游民
帖 子:79
专家分:45
注 册:2011-9-18
收藏
得分:0 
回复 5楼 jg658237
不知道。。。
2013-11-08 19:51
dtxwz
Rank: 2
等 级:论坛游民
帖 子:79
专家分:45
注 册:2011-9-18
收藏
得分:0 
回复 5楼 jg658237
可能是组件不完整吧。
2013-11-08 19:52
dtxwz
Rank: 2
等 级:论坛游民
帖 子:79
专家分:45
注 册:2011-9-18
收藏
得分:0 
fatal error C1083: Cannot open include file: 'windows.h': No such file or directory看来是我没有windows.h的头文件
2013-11-09 12:21
快速回复:为什么只能到4991
数据加载中...
 
   



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

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