标题:求助:这段代码编译有警告fatal error c1004: unexpected end of file foun ...
只看楼主
w716169470
Rank: 2
等 级:论坛游民
帖 子:51
专家分:25
注 册:2013-4-18
结帖率:61.54%
已结贴  问题点数:20 回复次数:2 
求助:这段代码编译有警告fatal error c1004: unexpected end of file found
#include <stdio.h>
#include <stdlib.h>

int main(int argc , char *argv[])
{
    int a[4][5] = {1, 3, 5, 7, 2, 4, 6, 8, 10, 11, 12, 13, 14, 9};
    int i, j, k, l, tmp;
 
    for(i = 0; i < 4 * 5 - 1; i++)
    {
        for(j = 0, k = -1, l = 0; j < 4 * 5 - i - 1; j++, l++)
        {
            if(!(l %= 5))
            {
                k++;
            }
            k %= 4;
            if(a[k][l] > a[k][l + 1])
            {
                tmp = a[k][l];
                a[k][l] = a[k][l + 1];
                a[k][l + 1] = tmp;
            }
    }

    for(i = 0; i < 4; i++)
    {
        for(j = 0; j < 5; j++)
        {
            printf("%d\t",a[i][j]);
        }
        printf("\n");
    }

    return EXIT_SUCCESS;
}
搜索更多相关主题的帖子: include unexpected 
2013-04-23 20:11
Magic_July
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:102
专家分:109
注 册:2012-9-25
得分:20 
少一个括号在23行后面
2013-04-23 20:18
w716169470
Rank: 2
等 级:论坛游民
帖 子:51
专家分:25
注 册:2013-4-18
得分:0 
回复 2楼 Magic_July
谢谢了 , 真练眼神阿。
2013-04-23 20:24



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




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

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