记录详情

Compile Error

foo.cc:37:17: error: ‘BigIntArray’ has not been declared
   37 |     friend bool BigIntArray::compare(const BigInt &a, const BigInt &b); // 声明为友元函数
      |                 ^~~~~~~~~~~
foo.cc: In static member function ‘static bool BigIntArray::compare(const BigInt&, const BigInt&)’:
foo.cc:56:15: error: ‘int BigInt::size’ is private within this context
   56 |         if (a.size != b.size)
      |               ^~~~
foo.cc:10:9: note: declared private here
   10 |     int size;
      |         ^~~~
foo.cc:56:25: error: ‘int BigInt::size’ is private within this context
   56 |         if (a.size != b.size)
      |                         ^~~~
foo.cc:10:9: note: declared private here
   10 |     int size;
      |         ^~~~
foo.cc:57:22: error: ‘int BigInt::size’ is private within this context
   57 |             return a.size < b.size;
      |                      ^~~~
foo.cc:10:9: note: declared private here
   10 |     int size;
      |         ^~~~
foo.cc:57:31: error: ‘int BigInt::size’ is private within this context
   57 |             return a.size < b.size;
      |                               ^~~~
foo.cc:10:9: note: declared private here
   10 |     int size;
      |         ^~~~
foo.cc:59:28: error: ‘int BigInt::size’ is private within this context
   59 |             for (int i = a.size; i >= 1; i--) {
      |                            ^~~~
foo.cc:10:9: note: declared private here
   10 |     int size;
      |         ^~~~
foo.cc:60:23: error: ‘int BigInt::a [10005]’ is private within this context
   60 |                 if (a.a[i] == b.a[i]) continue;
      |                       ^
foo.cc:9:9: note: declared private here
    9 |     int a[10005] = { 0 };
      |         ^
foo.cc:60:33: error: ‘int BigInt::a [10005]’ is private within this context
   60 |                 if (a.a[i] == b.a[i]) continue;
      |                                 ^
foo.cc:9:9: note: declared private here
    9 |     int a[10005] = { 0 };
      |         ^
foo.cc:61:31: error: ‘int BigInt::a [10005]’ is private within this context
   61 |                 else return a.a[i] < b.a[i];
      |                               ^
foo.cc:9:9: note: declared private here
    9 |     int a[10005] = { 0 };
      |         ^
foo.cc:61:40: error: ‘int BigInt::a [10005]’ is private within this context
   61 |                 else return a.a[i] < b.a[i];
      |                                        ^
foo.cc:9:9: note: declared private here
    9 |     int a[10005] = { 0 };
      |         ^

信息

递交者
类型
自测
题目
P1025 OO6-3 高精度整数集合类的插入排序
语言
C++
递交时间
2024-05-05 10:06:35
评测时间
2024-05-05 10:06:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes