标题:【新手】求高手帮忙看一下,这个错误怎么改
取消只看楼主
xueaen
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-9-11
结帖率:0
已结贴  问题点数:5 回复次数:1 
【新手】求高手帮忙看一下,这个错误怎么改
#include<stdio.h>
#include<string.h>
int main()
{
    __int64 n;
    __int64 k,i,j,h,p;
    __int64 a,b;
    __int64 count;
    __int64 bb;
    __int64 a[100000];
    __int64 sum;

        scanf("%I64d",&k);

        for(i=0;i<k;i++)
        {
            a=0;
            count=1;
            sum=0;

            scanf("%I64d",&n);
            for(j=1;;j++)
            {
                a=a+j;
                if(a==n)
                {
                    b=j;
                    bb=j;
                    break;
                }
                if(a>n)
                {
                    b=j+1;
                    bb=j+1;
                    break;
                }
            }

            while(b>=1)
            {
                b=b/10;
                count++;
            }

            for(p=0;p<count;p++)
            {
                a[p]=bb%10;
                bb=bb/10;
            }
            sum=a[0]+a[1];
            if(sum<=9)
                printf("%I64d\n",sum);
            if(sum>9)
                printf("%I64d\n",sum+1);
        }


    return 0;
}


编译错误:a' : '__int64 [100000]' differs in levels of indirection from '__int64'
          =' : left operand must be l-value
          subscript requires array or pointer type

搜索更多相关主题的帖子: include count 
2013-09-12 10:33
xueaen
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-9-11
得分:0 
谢谢各位亲
2013-09-12 12:37



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




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

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